diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-13 16:44:29 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-13 16:44:29 +0200 |
commit | 0ac24a98e4055f791f7dccee89997a7852c865b7 (patch) | |
tree | f1c361afa8142dcc1a169404b4f8deccb7dcf6b9 /GNUmakefile | |
parent | Removed comments (diff) | |
parent | Merge pull request #84 from tonibm19/patch-2 (diff) | |
download | cuberite-0ac24a98e4055f791f7dccee89997a7852c865b7.tar cuberite-0ac24a98e4055f791f7dccee89997a7852c865b7.tar.gz cuberite-0ac24a98e4055f791f7dccee89997a7852c865b7.tar.bz2 cuberite-0ac24a98e4055f791f7dccee89997a7852c865b7.tar.lz cuberite-0ac24a98e4055f791f7dccee89997a7852c865b7.tar.xz cuberite-0ac24a98e4055f791f7dccee89997a7852c865b7.tar.zst cuberite-0ac24a98e4055f791f7dccee89997a7852c865b7.zip |
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile index 5c9cf2bc2..277308e08 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -37,8 +37,6 @@ all: MCServer/MCServer # -- 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 @@ -83,6 +81,23 @@ endif +################################################### +# Set the link libraries based on the OS +# Linux uses libdl +# FreeBSD uses libltdl +# TODO: other OSs? + +UNAME := $(shell uname -s) +ifeq ($(UNAME),Linux) + LNK_LIBS = -lstdc++ -ldl +else + LNK_LIBS = -lstdc++ -lltdl +endif + + + + + ################ # 32-bit build override in 64-bit build environments # - so that BearBin doesn't need to modify his makefile after each makefile change :) |