From 02ba5785bff3a3723b1db60f68e21296dd36862b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 18 Feb 2015 13:42:26 +0000 Subject: [PATCH] Fix -fPIC when cross-compiling to windows --- library/Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/library/Makefile b/library/Makefile index 1580badc8..de00f7536 100644 --- a/library/Makefile +++ b/library/Makefile @@ -17,10 +17,15 @@ endif # To compile on Plan9: # CFLAGS += -D_BSD_EXTENSION +# if were running on Windows build for Windows +ifdef WINDOWS +WINDOWS_BUILD=1 +endif + # To compile as a shared library: ifdef SHARED # all code is position-indep with mingw, avoid warning about useless flag -ifndef WINDOWS +ifndef WINDOWS_BUILD CFLAGS += -fPIC endif endif @@ -31,14 +36,6 @@ DLEXT=so # OSX shared library extension: # DLEXT=dylib -# -# if we running on Windows build -# for Windows -# -ifdef WINDOWS -WINDOWS_BUILD=1 -endif - # Windows shared library extension: ifdef WINDOWS_BUILD DLEXT=dll