From cd5b529d6d13f4437226c04ffeea5d10462cc09a Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Thu, 10 May 2012 20:49:10 +0000 Subject: [PATCH] - Added automatic WINDOWS define in Makefile --- library/Makefile | 4 +++- programs/Makefile | 4 ++++ tests/Makefile | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/library/Makefile b/library/Makefile index 71e31d4c7..6337313d9 100644 --- a/library/Makefile +++ b/library/Makefile @@ -24,7 +24,9 @@ DLEXT=so # DLEXT=dylib # Windows shared library extension: -# DLEXT=dll +ifdef WINDOWS +DLEXT=dll +endif OBJS= aes.o arc4.o asn1parse.o \ asn1write.o \ diff --git a/programs/Makefile b/programs/Makefile index 8780633f5..3a4f72985 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -11,6 +11,10 @@ ifdef DEBUG CFLAGS += -g3 endif +ifdef WINDOWS +LDFLAGS += -lws2_32 +endif + APPS = aes/aescrypt2 aes/crypt_and_hash \ hash/hello hash/generic_sum \ hash/md5sum hash/sha1sum \ diff --git a/tests/Makefile b/tests/Makefile index 460858ad1..f25607b0f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -13,6 +13,10 @@ ifdef DEBUG CFLAGS += -g3 endif +ifdef WINDOWS +LDFLAGS += -lws2_32 +endif + APPS = test_suite_aes test_suite_arc4 \ test_suite_base64 test_suite_camellia \ test_suite_cipher.aes test_suite_cipher.camellia \