repositories
/
TD_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Buildsystem: be more friendly with cygwin environment
[TD_C.git]
/
TP_13
/
exo1
/
Makefile
diff --git
a/TP_13/exo1/Makefile
b/TP_13/exo1/Makefile
index 0e2661f1a1bf58e01246ab349ba383299ede1ad8..152498c48fc1188a4a3dafeff884d071e6cde775 100644
(file)
--- a/
TP_13/exo1/Makefile
+++ b/
TP_13/exo1/Makefile
@@
-21,8
+21,8
@@
BINARY_NAME=exo1
SRC_PATH:=src
LIBRARY_NAME=libexo1
LIBRARY_PATH:=lib
SRC_PATH:=src
LIBRARY_NAME=libexo1
LIBRARY_PATH:=lib
-
#
BUILD_TYPE=debug
-BUILD_TYPE=release
+BUILD_TYPE=debug
+
#
BUILD_TYPE=release
# ====================================
# DO NOT CHANGE STUFF BEYOND THIS LINE
# ====================================
# DO NOT CHANGE STUFF BEYOND THIS LINE
@@
-36,14
+36,15
@@
AR=ar
WARN_FLAGS = -Wall -Wextra
STD_FLAG = -std=c11
WARN_FLAGS = -Wall -Wextra
STD_FLAG = -std=c11
+UNAME := $(shell uname -o)
ifeq ($(BUILD_TYPE),debug)
BUILDDIR := .build/debug
DEBUG_FLAG = -g
STRIP_FLAG =
OPTI_FLAG = -O0
ifeq ($(BUILD_TYPE),debug)
BUILDDIR := .build/debug
DEBUG_FLAG = -g
STRIP_FLAG =
OPTI_FLAG = -O0
-LTO_SUPPORT =
no
-GOLD_SUPPORT =
no
+LTO_SUPPORT =
yes
+GOLD_SUPPORT =
yes
else
BUILDDIR := .build/release
DEBUG_FLAG =
else
BUILDDIR := .build/release
DEBUG_FLAG =
@@
-53,6
+54,10
@@
LTO_SUPPORT = yes
GOLD_SUPPORT = yes
endif
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
ifeq ($(LTO_SUPPORT),yes)
CFLAGS_LTO = -flto -ffat-lto-objects
LDFLAGS_LTO = -fuse-linker-plugin -flto