From 4e463d591d01d7fbccebd83cad416d1283e674d2 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 24 Nov 2013 14:31:36 +0000 Subject: Removed pedantic build and added optimisation to debug builds. --- GNUmakefile | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 338470592..b1b6f222a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -61,24 +61,14 @@ CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG LNK_OPTIONS = -pthread -ggdb -O3 -pg BUILDDIR = build/profile/ -else -ifeq ($(pedantic),1) -################ -# pedantic build - basically a debug build with lots of warnings -################ -CC_OPTIONS = -s -g -ggdb -D_DEBUG -Wall -Wextra -pedantic -ansi -Wno-long-long -CXX_OPTIONS = -s -g -ggdb -D_DEBUG -Wall -Wextra -pedantic -ansi -Wno-long-long -LNK_OPTIONS = -pthread -ggdb -BUILDDIR = build/pedantic/ - else ################ # debug build - fully traceable by gdb in C++ code, slowest # Since C code is used only for supporting libraries (zlib, lua), it is still O3-optimized ################ CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 -CXX_OPTIONS = -s -ggdb -g -D_DEBUG -LNK_OPTIONS = -pthread -g -ggdb +CXX_OPTIONS = -s -ggdb -g -D_DEBUG -Og +LNK_OPTIONS = -pthread -g -ggdb -Og BUILDDIR = build/debug/ endif endif -- cgit v1.2.3 From ac99f3df9d2a291549d0a4d5eb402707e359361d Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 24 Nov 2013 14:38:41 +0000 Subject: Removed extra endif. --- GNUmakefile | 1 - 1 file changed, 1 deletion(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 30e48dfd4..b1566cebc 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -75,7 +75,6 @@ LNK_OPTIONS = -pthread -g -ggdb -Og BUILDDIR = build/debug/ endif endif -endif ################################################## # Always be warning. -- cgit v1.2.3 From a01d4a7b4a76a65395d8c6d04a3fb88eb5e505b0 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 24 Nov 2013 14:57:44 +0000 Subject: Removed excess includes. --- GNUmakefile | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index b1566cebc..ce5920e5b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -138,18 +138,11 @@ endif # INCLUDE directories for MCServer INCLUDE = -I.\ - -Isource\ - -Isource/md5\ - -Isource/items\ - -Isource/blocks\ - -Itolua++-1.0.93/src/lib\ - -Ilua-5.1.4/src\ - -Izlib-1.2.7\ - -IiniFile\ - -Itolua++-1.0.93/include\ - -Ijsoncpp-src-0.5.0/include\ - -Ijsoncpp-src-0.5.0/src/lib_json\ - -Iexpat + -Isrc\ + -Isrc/md5\ + -Isrc/items\ + -Isrce/blocks\ + -Ilib @@ -158,7 +151,7 @@ INCLUDE = -I.\ ################################################### # Build MCServer -SOURCES := $(shell find CryptoPP lua-5.1.4 jsoncpp-src-0.5.0 zlib-1.2.7 source tolua++-1.0.93 iniFile expat '(' -name '*.cpp' -o -name '*.c' ')') +SOURCES := $(shell find src lib '(' -name '*.cpp' -o -name '*.c' ')') SOURCES := $(filter-out %minigzip.c %lua.c %tolua.c %toluabind.c %LeakFinder.cpp %StackWalker.cpp %example.c,$(SOURCES)) OBJECTS := $(patsubst %.c,$(BUILDDIR)%.o,$(SOURCES)) OBJECTS := $(patsubst %.cpp,$(BUILDDIR)%.o,$(OBJECTS)) -- cgit v1.2.3 From e3db69c4ae5d373ea1f1b31c0fc1889f328ea2ed Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 24 Nov 2013 18:44:22 +0000 Subject: Attempt to fix compilation --- GNUmakefile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index ce5920e5b..2ddfefee9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,9 +47,9 @@ ifeq ($(release),1) # release build - fastest run-time, no gdb support ################ -CC_OPTIONS = -g -O3 -DNDEBUG -CXX_OPTIONS = -g -O3 -DNDEBUG -LNK_OPTIONS = -pthread -O3 +CC_OPTIONS = -g -Ofast -DNDEBUG +CXX_OPTIONS = -g -Ofast -DNDEBUG +LNK_OPTIONS = -pthread -Ofast BUILDDIR = build/release/ else @@ -58,18 +58,18 @@ ifeq ($(profile),1) # profile build - a release build with symbols and profiling engine built in ################ -CC_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG -CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG -LNK_OPTIONS = -pthread -ggdb -O3 -pg +CC_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG +CXX_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG +LNK_OPTIONS = -pthread -ggdb -Ofast -pg BUILDDIR = build/profile/ else ################ # debug build - fully traceable by gdb in C++ code, slowest -# Since C code is used only for supporting libraries (zlib, lua), it is still O3-optimized +# Since C code is used only for supporting libraries (zlib, lua), it is still Ofast-optimized ################ -CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 +CC_OPTIONS = -s -ggdb -g -D_DEBUG -Ofast CXX_OPTIONS = -s -ggdb -g -D_DEBUG -Og LNK_OPTIONS = -pthread -g -ggdb -Og BUILDDIR = build/debug/ @@ -139,7 +139,6 @@ endif INCLUDE = -I.\ -Isrc\ - -Isrc/md5\ -Isrc/items\ -Isrce/blocks\ -Ilib -- cgit v1.2.3 From 2dee812667e1f86f65ad25430fae17e23baa784c Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 26 Nov 2013 22:37:44 +0000 Subject: Possibly fixed Linux makefile --- GNUmakefile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 2ddfefee9..981809ffd 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,8 +47,14 @@ ifeq ($(release),1) # release build - fastest run-time, no gdb support ################ -CC_OPTIONS = -g -Ofast -DNDEBUG -CXX_OPTIONS = -g -Ofast -DNDEBUG +ifeq ($(disableasm),1) + CC_OPTIONS = -g -O3 -DNDEBUG + CXX_OPTIONS = -g -O3 -DNDEBUG +else + CC_OPTIONS = -g -Ofast -DNDEBUG + CXX_OPTIONS = -g -Ofast -DNDEBUG +endif + LNK_OPTIONS = -pthread -Ofast BUILDDIR = build/release/ @@ -58,8 +64,14 @@ ifeq ($(profile),1) # profile build - a release build with symbols and profiling engine built in ################ -CC_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG -CXX_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG +ifeq ($(disableasm),1) + CC_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG + CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG +else + CC_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG + CXX_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG +endif + LNK_OPTIONS = -pthread -ggdb -Ofast -pg BUILDDIR = build/profile/ @@ -88,6 +100,7 @@ ifeq ($(shell $(CXX) --version 2>&1 | grep -i -c "clang version"),0) CC_OPTIONS += -Wno-tautological-compare CXX_OPTIONS += -Wno-tautological-compare disableasm = 1 +disableofast = 1 endif @@ -141,7 +154,7 @@ INCLUDE = -I.\ -Isrc\ -Isrc/items\ -Isrce/blocks\ - -Ilib + -Ilib\ -- cgit v1.2.3 From f87bb1619e7cd438913d5c203183ca35f23928ac Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 26 Nov 2013 22:43:22 +0000 Subject: Fixed Linux compile again --- GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 981809ffd..1e09ade98 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,7 +47,7 @@ ifeq ($(release),1) # release build - fastest run-time, no gdb support ################ -ifeq ($(disableasm),1) +ifeq ($(disableofast),1) CC_OPTIONS = -g -O3 -DNDEBUG CXX_OPTIONS = -g -O3 -DNDEBUG else @@ -64,7 +64,7 @@ ifeq ($(profile),1) # profile build - a release build with symbols and profiling engine built in ################ -ifeq ($(disableasm),1) +ifeq ($(disableofast),1) CC_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG else -- cgit v1.2.3 From b358032fe9095ddd92df4dd02dbab978ee408eb4 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 26 Nov 2013 23:15:32 +0000 Subject: Makefile fix --- GNUmakefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 1e09ade98..f36ffe8bb 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -50,12 +50,12 @@ ifeq ($(release),1) ifeq ($(disableofast),1) CC_OPTIONS = -g -O3 -DNDEBUG CXX_OPTIONS = -g -O3 -DNDEBUG + LNK_OPTIONS = -pthread -O3 else CC_OPTIONS = -g -Ofast -DNDEBUG CXX_OPTIONS = -g -Ofast -DNDEBUG + LNK_OPTIONS = -pthread -Ofast endif - -LNK_OPTIONS = -pthread -Ofast BUILDDIR = build/release/ else @@ -67,12 +67,13 @@ ifeq ($(profile),1) ifeq ($(disableofast),1) CC_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG + LNK_OPTIONS = -pthread -ggdb -O3 -pg else CC_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG CXX_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG + LNK_OPTIONS = -pthread -ggdb -Ofast -pg endif -LNK_OPTIONS = -pthread -ggdb -Ofast -pg BUILDDIR = build/profile/ else @@ -81,7 +82,12 @@ else # Since C code is used only for supporting libraries (zlib, lua), it is still Ofast-optimized ################ -CC_OPTIONS = -s -ggdb -g -D_DEBUG -Ofast +ifeq ($(disableofast),1) + CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 +else + CC_OPTIONS = -s -ggdb -g -D_DEBUG -Ofast +endif + CXX_OPTIONS = -s -ggdb -g -D_DEBUG -Og LNK_OPTIONS = -pthread -g -ggdb -Og BUILDDIR = build/debug/ -- cgit v1.2.3 From 83d582d083c92e51a85fa825907493aebb866af7 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 27 Nov 2013 07:19:12 +0000 Subject: Removed a -Ofast bit. --- GNUmakefile | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index f36ffe8bb..a963da098 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,15 +47,10 @@ ifeq ($(release),1) # release build - fastest run-time, no gdb support ################ -ifeq ($(disableofast),1) - CC_OPTIONS = -g -O3 -DNDEBUG - CXX_OPTIONS = -g -O3 -DNDEBUG - LNK_OPTIONS = -pthread -O3 -else - CC_OPTIONS = -g -Ofast -DNDEBUG - CXX_OPTIONS = -g -Ofast -DNDEBUG - LNK_OPTIONS = -pthread -Ofast -endif +CC_OPTIONS = -g -O3 -DNDEBUG +CXX_OPTIONS = -g -O3 -DNDEBUG +LNK_OPTIONS = -pthread -O3 + BUILDDIR = build/release/ else @@ -64,15 +59,9 @@ ifeq ($(profile),1) # profile build - a release build with symbols and profiling engine built in ################ -ifeq ($(disableofast),1) - CC_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG - CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG - LNK_OPTIONS = -pthread -ggdb -O3 -pg -else - CC_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG - CXX_OPTIONS = -s -g -ggdb -Ofast -pg -DNDEBUG - LNK_OPTIONS = -pthread -ggdb -Ofast -pg -endif +CC_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG +CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG +LNK_OPTIONS = -pthread -ggdb -O3 -pg BUILDDIR = build/profile/ @@ -82,11 +71,7 @@ else # Since C code is used only for supporting libraries (zlib, lua), it is still Ofast-optimized ################ -ifeq ($(disableofast),1) CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 -else - CC_OPTIONS = -s -ggdb -g -D_DEBUG -Ofast -endif CXX_OPTIONS = -s -ggdb -g -D_DEBUG -Og LNK_OPTIONS = -pthread -g -ggdb -Og -- cgit v1.2.3 From 2113ca384450eb0155c43452690bda08b62cb6aa Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 27 Nov 2013 09:17:25 +0100 Subject: Fixed VC2008 compilation, normalized include paths. --- GNUmakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index a963da098..8c452c1cc 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -143,9 +143,8 @@ endif INCLUDE = -I.\ -Isrc\ - -Isrc/items\ - -Isrce/blocks\ -Ilib\ + -Ilib/jsoncpp/include -- cgit v1.2.3