diff --git a/src/3rdparty/crypt/bcrypt/Makefile b/src/3rdparty/crypt/bcrypt/Makefile index a8b9d07..aa5ef78 100644 --- a/src/3rdparty/crypt/bcrypt/Makefile +++ b/src/3rdparty/crypt/bcrypt/Makefile @@ -10,11 +10,11 @@ test: bcrypt.c crypt_blowfish bcrypt.a: bcrypt.o crypt_blowfish ar r bcrypt.a bcrypt.o crypt_blowfish/*.o - ln -s bcrypt.o libbcrypt.so - + ld -r bcrypt.o crypt_blowfish/*.o -o libbcrypt.o + bcrypt.o: bcrypt.c - $(CC) $(CFLAGS) -c bcrypt.c - + $(CC) $(CFLAGS) -c -fPIC bcrypt.c + crypt_blowfish: $(MAKE) -C crypt_blowfish diff --git a/src/3rdparty/crypt/bcrypt/bcrypt_test_static.c b/src/3rdparty/crypt/bcrypt/bcrypt_test_static.c new file mode 100644 index 0000000..f3fdbf7 --- /dev/null +++ b/src/3rdparty/crypt/bcrypt/bcrypt_test_static.c @@ -0,0 +1,12 @@ +#include +#include "bcrypt.h" + +int main() { + + char salt[22]; + char hash[64]; + bcrypt_gensalt(64, salt); + bcrypt_hashpw("Hashed", salt, hash); + printf("%s", hash); + +} \ No newline at end of file diff --git a/src/3rdparty/crypt/bcrypt/crypt_blowfish/Makefile b/src/3rdparty/crypt/bcrypt/crypt_blowfish/Makefile index c162adc..fe3da80 100644 --- a/src/3rdparty/crypt/bcrypt/crypt_blowfish/Makefile +++ b/src/3rdparty/crypt/bcrypt/crypt_blowfish/Makefile @@ -18,7 +18,7 @@ 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 +CFLAGS = -fPIC -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 @@ -68,7 +68,7 @@ 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 + $(CC) -shared -c $(CFLAGS) $*.c .S.o: $(AS) $(ASFLAGS) $*.S diff --git a/src/3rdparty/crypt/bcrypt/crypt_blowfish/libbcrypt.so b/src/3rdparty/crypt/bcrypt/crypt_blowfish/libbcrypt.so deleted file mode 100644 index 4a80a72..0000000 Binary files a/src/3rdparty/crypt/bcrypt/crypt_blowfish/libbcrypt.so and /dev/null differ