summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-07 23:15:10 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-07 23:15:10 +0200
commitee1e0d0eff0e4d93f17a4b90322735f3b66e63c5 (patch)
treec45f656ee241669a117f93cc01355e4a14711c50
parentAnvil loader: fixed Vanilla biomes not being read (diff)
downloadcuberite-ee1e0d0eff0e4d93f17a4b90322735f3b66e63c5.tar
cuberite-ee1e0d0eff0e4d93f17a4b90322735f3b66e63c5.tar.gz
cuberite-ee1e0d0eff0e4d93f17a4b90322735f3b66e63c5.tar.bz2
cuberite-ee1e0d0eff0e4d93f17a4b90322735f3b66e63c5.tar.lz
cuberite-ee1e0d0eff0e4d93f17a4b90322735f3b66e63c5.tar.xz
cuberite-ee1e0d0eff0e4d93f17a4b90322735f3b66e63c5.tar.zst
cuberite-ee1e0d0eff0e4d93f17a4b90322735f3b66e63c5.zip
Diffstat (limited to '')
-rw-r--r--GNUmakefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 6e29f0a8b..4907f7217 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -33,15 +33,19 @@ all: MCServer/MCServer
# CC_OPTIONS ... options for the C code compiler
# CXX_OPTIONS ... options for the C++ code compiler
# LNK_OPTIONS ... options for the linker
+# LNK_LIBS ... libraries to link in
+# -- according to http://stackoverflow.com/questions/6183899/undefined-reference-to-dlopen, libs must come after all sources
# BUILDDIR ... folder where the intermediate object files are built
+LNK_LIBS = -lstdc++ -ldl
+
ifeq ($(release),1)
################
# release build - fastest run-time, no gdb support
################
CC_OPTIONS = -s -g -O3 -DNDEBUG
CXX_OPTIONS = -s -g -O3 -DNDEBUG
-LNK_OPTIONS = -lstdc++ -ldl -pthread -O3
+LNK_OPTIONS = -pthread -O3
BUILDDIR = build/release/
else
@@ -51,7 +55,7 @@ ifeq ($(profile),1)
################
CC_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG
CXX_OPTIONS = -s -g -ggdb -O3 -pg -DNDEBUG
-LNK_OPTIONS = -lstdc++ -ldl -pthread -ggdb -O3 -pg
+LNK_OPTIONS = -pthread -ggdb -O3 -pg
BUILDDIR = build/profile/
else
@@ -61,7 +65,7 @@ ifeq ($(pedantic),1)
################
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 = -lstdc++ -ldl -pthread -ggdb
+LNK_OPTIONS = -pthread -ggdb
BUILDDIR = build/pedantic/
else
@@ -71,7 +75,7 @@ else
################
CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3
CXX_OPTIONS = -s -ggdb -g -D_DEBUG
-LNK_OPTIONS = -lstdc++ -ldl -pthread -g -ggdb
+LNK_OPTIONS = -pthread -g -ggdb
BUILDDIR = build/debug/
endif
endif
@@ -123,7 +127,7 @@ OBJECTS := $(patsubst %.cpp,$(BUILDDIR)%.o,$(OBJECTS))
-include $(patsubst %.o,%.d,$(OBJECTS))
MCServer/MCServer : $(OBJECTS)
- $(CC) $(LNK_OPTIONS) $(OBJECTS) -o MCServer/MCServer
+ $(CC) $(LNK_OPTIONS) $(OBJECTS) $(LNK_LIBS) -o MCServer/MCServer
clean :
rm -rf $(BUILDDIR) MCServer/MCServer