Buildsystem: be more friendly with cygwin environment
[TD_C.git] / TP_13 / exo2 / Makefile
index 8f48f4e661d0cc491f7a60c2ef854a7b3dc30a6e..2fa2084721105e90944063a06a376fcb9fe8ca9e 100644 (file)
@@ -37,6 +37,7 @@ AR=ar
 
 WARN_FLAGS = -Wall -Wextra
 STD_FLAG = -std=c11
+UNAME := $(shell uname -o)
 
 ifeq ($(BUILD_TYPE),debug)
 BUILDDIR := .build/debug
@@ -54,6 +55,10 @@ LTO_SUPPORT = yes
 GOLD_SUPPORT = yes
 endif
 
+ifeq ($(UNAME),Cygwin)
+GOLD_SUPPORT = no
+endif
+
 ifeq ($(LTO_SUPPORT),yes)
 CFLAGS_LTO = -flto -ffat-lto-objects
 LDFLAGS_LTO = -fuse-linker-plugin -flto