nitc: link with pcreposix but not rt on Windows when using mingw64
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 28 Oct 2016 00:42:02 +0000 (20:42 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 10 Feb 2017 19:07:54 +0000 (14:07 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/compiler/abstract_compiler.nit

index 7ad452b..8bdfdee 100644 (file)
@@ -403,6 +403,15 @@ ifeq ($(uname_S),Darwin)
        LDLIBS := $(filter-out -lrt,$(LDLIBS))
 endif
 
+# Special configuration for Windows under mingw64
+ifeq ($(uname_S),MINGW64_NT-10.0)
+       # Use the pcreposix regex library
+       LDLIBS += -lpcreposix
+
+       # Remove POSIX flag -lrt
+       LDLIBS := $(filter-out -lrt,$(LDLIBS))
+endif
+
 """
 
                makefile.write("all: {outpath}\n")