From 27df1bd7d0f8eb3dae9e4b41f5b91e01ba2df2fe Mon Sep 17 00:00:00 2001 From: FinnHornhoover Date: Sun, 20 Sep 2020 01:24:42 +0300 Subject: [PATCH 1/2] fixed indent --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 51a17f3..c180638 100644 --- a/Makefile +++ b/Makefile @@ -103,9 +103,9 @@ windows : CXXFLAGS=$(WIN_CXXFLAGS) windows : LDFLAGS=$(WIN_LDFLAGS) windows : SERVER=$(WIN_SERVER) windows : -ifneq ($(shell $(WIN_CXX) --version | head -1 | egrep -o [0-9]+ | tail -3 | head -1), 10) -WIN_CXX_OPT_DISABLES=$(WIN_CXX_VANILLA_MINGW_OPT_DISABLES) -endif + ifneq ($(shell $(WIN_CXX) --version | head -1 | egrep -o [0-9]+ | tail -3 | head -1), 10) + WIN_CXX_OPT_DISABLES=$(WIN_CXX_VANILLA_MINGW_OPT_DISABLES) + endif CXXFLAGS+= -DGIT_VERSION=\"$(shell git describe --tags)\" From a05bb15697c2bb20255a08c7063ed14e129e2059 Mon Sep 17 00:00:00 2001 From: FinnHornhoover Date: Mon, 21 Sep 2020 02:12:34 +0300 Subject: [PATCH 2/2] fixed makefile append and mingw bugs --- Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index c180638..f906514 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ CC=clang CXX=clang++ # -w suppresses all warnings (the part that's commented out helps me find memory leaks, it ruins performance though!) CFLAGS=-O3 #-g3 -fsanitize=address -CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O2 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) #-g3 -fsanitize=address +CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O2 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(shell git describe --tags)\" #-g3 -fsanitize=address LDFLAGS=-lpthread -ldl #-g3 -fsanitize=address # specifies the name of our exectuable SERVER=bin/fusion @@ -16,8 +16,8 @@ WIN_CC=x86_64-w64-mingw32-gcc WIN_CXX=x86_64-w64-mingw32-g++ WIN_CFLAGS=-O3 #-g3 -fsanitize=address WIN_CXX_VANILLA_MINGW_OPT_DISABLES=-fno-tree-dce -fno-inline-small-functions -WIN_CXX_OPT_DISABLES=-fno-tree-dce -fno-tree-fre -fno-tree-vrp -fno-ipa-sra -WIN_CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O3 $(WIN_CXX_OPT_DISABLES) -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) #-g3 -fsanitize=address +WIN_CXX_MSYS2_MINGW_OPT_DISABLES=-fno-tree-dce -fno-tree-fre -fno-tree-vrp -fno-ipa-sra +WIN_CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O3 $(WIN_CXX_OPT_DISABLES) -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(shell git describe --tags)\" #-g3 -fsanitize=address WIN_LDFLAGS=-static -lws2_32 -lwsock32 #-g3 -fsanitize=address WIN_SERVER=bin/winfusion.exe @@ -102,12 +102,7 @@ windows : CFLAGS=$(WIN_CFLAGS) windows : CXXFLAGS=$(WIN_CXXFLAGS) windows : LDFLAGS=$(WIN_LDFLAGS) windows : SERVER=$(WIN_SERVER) -windows : - ifneq ($(shell $(WIN_CXX) --version | head -1 | egrep -o [0-9]+ | tail -3 | head -1), 10) - WIN_CXX_OPT_DISABLES=$(WIN_CXX_VANILLA_MINGW_OPT_DISABLES) - endif - -CXXFLAGS+= -DGIT_VERSION=\"$(shell git describe --tags)\" +windows : WIN_CXX_OPT_DISABLES=$(if $(filter-out 10, $(shell $(WIN_CXX) -dumpversion | egrep -o ^[0-9]+)), $(WIN_CXX_VANILLA_MINGW_OPT_DISABLES), $(WIN_CXX_MSYS2_MINGW_OPT_DISABLES)) .SUFFIX: .o .c .cpp .h .hpp