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 From a5425e0557ff0e288cf709268397826431b3f389 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 27 Nov 2013 16:57:28 +0000 Subject: Removed the -Og option, which is rather new. --- GNUmakefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 8c452c1cc..f83de0ac5 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -71,10 +71,9 @@ else # Since C code is used only for supporting libraries (zlib, lua), it is still Ofast-optimized ################ - CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 - -CXX_OPTIONS = -s -ggdb -g -D_DEBUG -Og -LNK_OPTIONS = -pthread -g -ggdb -Og +CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 +CXX_OPTIONS = -s -ggdb -g -D_DEBUG -O1 +LNK_OPTIONS = -pthread -g -ggdb -O1 BUILDDIR = build/debug/ endif endif -- cgit v1.2.3 From 3568adafc2117a453a272beec643d133550318d8 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 27 Nov 2013 16:59:58 +0000 Subject: Removed the -g option for release builds, as binaries were getting huge. --- GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index f83de0ac5..b5c3da081 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,8 +47,8 @@ ifeq ($(release),1) # release build - fastest run-time, no gdb support ################ -CC_OPTIONS = -g -O3 -DNDEBUG -CXX_OPTIONS = -g -O3 -DNDEBUG +CC_OPTIONS = -O3 -DNDEBUG +CXX_OPTIONS = -O3 -DNDEBUG LNK_OPTIONS = -pthread -O3 BUILDDIR = build/release/ -- cgit v1.2.3 From 596963743e4651d4ae7560bde336852034baa50f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 27 Nov 2013 17:18:40 +0000 Subject: Fixed a load of issues, clang autodetection works now. This fixes issue #210. This also removes the disableasm option, so it would be wise to remove it from any scripts that use it. I also removed a random line in the middle of globals.h, why was it there? --- GNUmakefile | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index b5c3da081..4b4bc0386 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -74,7 +74,9 @@ else CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 CXX_OPTIONS = -s -ggdb -g -D_DEBUG -O1 LNK_OPTIONS = -pthread -g -ggdb -O1 + BUILDDIR = build/debug/ + endif endif @@ -86,11 +88,9 @@ CXX_OPTIONS += -Wall ################################################### # Fix Crypto++ warnings in clang -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 +ifeq ($(shell $(CXX) --version 2>&1 | grep -i -c "clang version"),1) +CC_OPTIONS += -DCRYPTOPP_DISABLE_ASM +CXX_OPTIONS += -DCRYPTOPP_DISABLE_ASM endif @@ -125,23 +125,10 @@ endif -################################################### -# Clang doesn't seem to support CryptoPP's assembly mode, disable it for now (CryptoPP 5.6.2) - -ifeq ($(disableasm),1) - CC_OPTIONS += -DCRYPTOPP_DISABLE_ASM - CXX_OPTIONS += -DCRYPTOPP_DISABLE_ASM -endif - - - - - ################################################### # INCLUDE directories for MCServer -INCLUDE = -I.\ - -Isrc\ +INCLUDE = -Isrc\ -Ilib\ -Ilib/jsoncpp/include -- cgit v1.2.3 From 187a0dbaa2106b74c0e137ce4a883683b844d543 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 27 Nov 2013 17:54:23 +0000 Subject: Removed some useless options. --- GNUmakefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 4b4bc0386..e0e606d90 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -59,8 +59,8 @@ 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 +CC_OPTIONS = -g -ggdb -O3 -pg -DNDEBUG +CXX_OPTIONS = -g -ggdb -O3 -pg -DNDEBUG LNK_OPTIONS = -pthread -ggdb -O3 -pg BUILDDIR = build/profile/ @@ -71,8 +71,8 @@ else # Since C code is used only for supporting libraries (zlib, lua), it is still Ofast-optimized ################ -CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3 -CXX_OPTIONS = -s -ggdb -g -D_DEBUG -O1 +CC_OPTIONS = -ggdb -g -D_DEBUG -O3 +CXX_OPTIONS = -ggdb -g -D_DEBUG -O1 LNK_OPTIONS = -pthread -g -ggdb -O1 BUILDDIR = build/debug/ -- cgit v1.2.3