diff --git a/programs/Makefile b/programs/Makefile index ebdadc056..c0856b0ac 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -43,16 +43,17 @@ WINDOWS_BUILD=1 endif ifdef WINDOWS_BUILD -DLEXT=dll -EXEXT=.exe -LOCAL_LDFLAGS += -lws2_32 -lbcrypt -ifdef SHARED -SHARED_SUFFIX=.$(DLEXT) -endif -else -DLEXT ?= so -EXEXT= -SHARED_SUFFIX= + DLEXT=dll + EXEXT=.exe + LOCAL_LDFLAGS += -lws2_32 -lbcrypt + ifdef SHARED + SHARED_SUFFIX=.$(DLEXT) + endif + +else # Not building for Windows + DLEXT ?= so + EXEXT= + SHARED_SUFFIX= endif ifdef WINDOWS diff --git a/tests/Makefile b/tests/Makefile index 29197b7c7..b044d2522 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -47,20 +47,21 @@ WINDOWS_BUILD=1 endif ifdef WINDOWS_BUILD -DLEXT=dll -EXEXT=.exe -LOCAL_LDFLAGS += -lws2_32 -lbcrypt -ifdef SHARED -SHARED_SUFFIX=.$(DLEXT) -endif -else -DLEXT ?= so -EXEXT= -SHARED_SUFFIX= + DLEXT=dll + EXEXT=.exe + LOCAL_LDFLAGS += -lws2_32 -lbcrypt + ifdef SHARED + SHARED_SUFFIX=.$(DLEXT) + endif -ifeq ($(THREADING),pthread) -LOCAL_LDFLAGS += -lpthread -endif +else # Not building for Windows + DLEXT ?= so + EXEXT= + SHARED_SUFFIX= + + ifeq ($(THREADING),pthread) + LOCAL_LDFLAGS += -lpthread + endif endif ifdef WINDOWS