summaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-27 22:35:13 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-27 22:35:13 +0100
commita6630d32394120a78af56bc612fa3c3449283248 (patch)
tree2c791266b0f213cd56961299da8d2258b8f85d8e /GNUmakefile
parentFixed spawn point being generally in an ocean (diff)
parentVoronoi-related biomegens use the new cVoronoiMap class. (diff)
downloadcuberite-a6630d32394120a78af56bc612fa3c3449283248.tar
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.gz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.bz2
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.lz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.xz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.zst
cuberite-a6630d32394120a78af56bc612fa3c3449283248.zip
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile69
1 files changed, 19 insertions, 50 deletions
diff --git a/GNUmakefile b/GNUmakefile
index d8afc0525..e0e606d90 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -47,9 +47,10 @@ 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/
else
@@ -58,33 +59,24 @@ 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/
-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/
+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
-CXX_OPTIONS = -s -ggdb -g -D_DEBUG
-LNK_OPTIONS = -pthread -g -ggdb
+CC_OPTIONS = -ggdb -g -D_DEBUG -O3
+CXX_OPTIONS = -ggdb -g -D_DEBUG -O1
+LNK_OPTIONS = -pthread -g -ggdb -O1
+
BUILDDIR = build/debug/
-endif
+
endif
endif
@@ -96,10 +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
+ifeq ($(shell $(CXX) --version 2>&1 | grep -i -c "clang version"),1)
+CC_OPTIONS += -DCRYPTOPP_DISABLE_ASM
+CXX_OPTIONS += -DCRYPTOPP_DISABLE_ASM
endif
@@ -135,33 +126,11 @@ 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.\
- -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
+INCLUDE = -Isrc\
+ -Ilib\
+ -Ilib/jsoncpp/include
@@ -170,7 +139,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))