summaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile50
1 files changed, 15 insertions, 35 deletions
diff --git a/GNUmakefile b/GNUmakefile
index d8afc0525..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,35 +58,23 @@ 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
-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
+# 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 = -s -ggdb -g -D_DEBUG -Ofast
+CXX_OPTIONS = -s -ggdb -g -D_DEBUG -Og
+LNK_OPTIONS = -pthread -g -ggdb -Og
BUILDDIR = build/debug/
endif
endif
-endif
##################################################
# Always be warning.
@@ -150,18 +138,10 @@ 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/items\
+ -Isrce/blocks\
+ -Ilib
@@ -170,7 +150,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))