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
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
-LTO_SUPPORT = no
-GOLD_SUPPORT = no
+LTO_SUPPORT = yes
+GOLD_SUPPORT = yes
else
BUILDDIR := .build/release
DEBUG_FLAG =
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