diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-19 22:27:31 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-19 22:27:31 +0200 |
commit | fd9e2f7245212f2b652652f4669648260e59f9e9 (patch) | |
tree | 35e12c2f78cde9338f34780921cd8020eea1bbb4 /crypt/Makefile | |
parent | 93c1df59ef14348e9a3e1d66ea0b96960f5b5732 (diff) | |
download | cforum-fd9e2f7245212f2b652652f4669648260e59f9e9.tar.gz |
Add bcrypt
Diffstat (limited to 'crypt/Makefile')
-rw-r--r-- | crypt/Makefile | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/crypt/Makefile b/crypt/Makefile new file mode 100644 index 0000000..6531c7b --- /dev/null +++ b/crypt/Makefile @@ -0,0 +1,77 @@ +# +# Written and revised by Solar Designer <solar at openwall.com> in 2000-2011. +# No copyright is claimed, and the software is hereby placed in the public +# domain. In case this attempt to disclaim copyright and place the software +# in the public domain is deemed null and void, then the software is +# Copyright (c) 2000-2011 Solar Designer and it is hereby released to the +# general public under the following terms: +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted. +# +# There's ABSOLUTELY NO WARRANTY, express or implied. +# +# See crypt_blowfish.c for more information. +# + +CC = gcc +AS = $(CC) +LD = $(CC) +RM = rm -f +CFLAGS = -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wundef -Wpointer-arith -O2 -fomit-frame-pointer -funroll-loops +ASFLAGS = -c +LDFLAGS = -s + +BLOWFISH_OBJS = \ + crypt_blowfish.o x86.o + +CRYPT_OBJS = \ + $(BLOWFISH_OBJS) crypt_gensalt.o wrapper.o + +TEST_OBJS = \ + $(BLOWFISH_OBJS) crypt_gensalt.o crypt_test.o + +TEST_THREADS_OBJS = \ + $(BLOWFISH_OBJS) crypt_gensalt.o crypt_test_threads.o + +EXTRA_MANS = \ + crypt_r.3 crypt_rn.3 crypt_ra.3 \ + crypt_gensalt.3 crypt_gensalt_rn.3 crypt_gensalt_ra.3 + +all: $(CRYPT_OBJS) + +check: crypt_test + ./crypt_test + +crypt_test: $(TEST_OBJS) + $(LD) $(LDFLAGS) $(TEST_OBJS) -o $@ + +crypt_test.o: wrapper.c ow-crypt.h crypt_blowfish.h crypt_gensalt.h + $(CC) -c $(CFLAGS) wrapper.c -DTEST -o $@ + +check_threads: crypt_test_threads + ./crypt_test_threads + +crypt_test_threads: $(TEST_THREADS_OBJS) + $(LD) $(LDFLAGS) $(TEST_THREADS_OBJS) -lpthread -o $@ + +crypt_test_threads.o: wrapper.c ow-crypt.h crypt_blowfish.h crypt_gensalt.h + $(CC) -c $(CFLAGS) wrapper.c -DTEST -DTEST_THREADS=4 -o $@ + +man: $(EXTRA_MANS) + +$(EXTRA_MANS): + echo '.so man3/crypt.3' > $@ + +crypt_blowfish.o: crypt_blowfish.h +crypt_gensalt.o: crypt_gensalt.h +wrapper.o: crypt.h ow-crypt.h crypt_blowfish.h crypt_gensalt.h + +.c.o: + $(CC) -c $(CFLAGS) $*.c + +.S.o: + $(AS) $(ASFLAGS) $*.S + +clean: + $(RM) crypt_test crypt_test_threads *.o $(EXTRA_MANS) core |