From f8a30757b0050c5dc3c4b9f49724a926adf00a05 Mon Sep 17 00:00:00 2001 From: sk-5 Date: Fri, 11 Mar 2016 11:01:58 -0800 Subject: [PATCH] Modifed makefiles to create single .o bcrypt file --- src/3rdparty/crypt/bcrypt/Makefile | 8 ++++---- src/3rdparty/crypt/bcrypt/bcrypt_test_static.c | 12 ++++++++++++ .../crypt/bcrypt/crypt_blowfish/Makefile | 4 ++-- .../crypt/bcrypt/crypt_blowfish/libbcrypt.so | Bin 3424 -> 0 bytes 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 src/3rdparty/crypt/bcrypt/bcrypt_test_static.c delete mode 100644 src/3rdparty/crypt/bcrypt/crypt_blowfish/libbcrypt.so 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 4a80a729f2c276310843eccda2c5eca23349c41e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3424 zcmbtVUu;uV7(ch|wvNKR6@iREq$b6b2$yv%I?zB*xgBS*Xd)XfGAv!!xw)=gx;tP7 zaON_S>llBO2OoVQ@xcdQY}kX+Ws5@}6nP*fL?mFu8N^8<62aB)J3V*Y)h;3UCB5gI z-}!xi&iTIc^_@tx(IH915{Yaj4_6jS$hGQ+^AMkgh)g`BWtaI6Gj6$mL5!IbQ%;_95sK9 zns+txCf8yZ&sJ(|bLl@K7Ah19#yx3e-ncevJN0VO^bO%%J3mHYfLum*-P8# zUit=&LHukue`JD56U?~3eE)lB~->Wjs&U`pd1Hrnj>^4QK-AT*pe?@=W(Io$`LiI{J>xq;$pIIo<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