diff options
author | Nicolas Noble <pixel@Aoshi.local> | 2008-11-28 17:26:01 -0800 |
---|---|---|
committer | Nicolas Noble <pixel@Aoshi.local> | 2008-11-28 17:26:01 -0800 |
commit | c9d980fd1e4cec1973ea3e7d54ae7057e9c29e08 (patch) | |
tree | 5dab5b0781bc53e04f546e700cc822b1956e5d88 /Makefile | |
parent | f922b423225678f3f6431cc96b672e24e5cb9931 (diff) |
Early port under Darwin x86-64
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -1,3 +1,15 @@ +SYSTEM=$(shell uname) +ifeq ($(SYSTEM),Darwin) +ARCH_FLAGS=-m64 +LDFLAGS_MESA=-all-load ../Mesa-7.2/lib/libGLU.a ../Mesa-7.2/lib/libOSMesa.a +CPPFLAGS_READLINE= +LDFLAGS_READLINE=-lreadline -lncurses +else +ARCH_FLAGS=-march=i686 +LDFLAGS_MESA=-u gluNewTess -Wl,--whole-archive ../Mesa-7.2/lib/libGLU.a ../Mesa-7.2/lib/libOSMesa.a -Wl,--no-whole-archive +CPPFLAGS_READLINE=-DREADLINE_STATIC +LDFLAGS_READLINE=/usr/lib/libreadline.a /usr/lib/libncurses.a +endif CC = gcc CXX = g++ LD = g++ @@ -10,7 +22,7 @@ INCLUDES = \ -I../Baltisot/lib/lua/include -I../Baltisot/lib/lua/includes \ -I../lua-modules/src \ \ --I ../Mesa-7.0.3/include \ +-I ../Mesa-7.2/include \ -I ../tinyxml \ -I /usr/include/mysql \ -I /usr/include/FTGL -I /usr/include/freetype2 \ @@ -18,9 +30,11 @@ INCLUDES = \ HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_FCNTL -DHAVE_MYSQL -DHAVE_UNISTD_H -DHAVE_FORK -DHAVE_PIPE -DHAVE_FSYNC -DHAVE_MALLOC_H -DHAVE_ASPRINTF -DHAVE_BYTESWAP_H -CPPFLAGS += $(INCLUDES) -g -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -fexceptions -DWORDS_LITTLEENDIAN -fexceptions -march=i686 $(HAVES) -DUSE_MPQLIB +CPPFLAGS += $(INCLUDES) -g -DSTDC_HEADERS $(CPPFLAGS_READLINE) -DHOOK_STDS -fexceptions -DWORDS_LITTLEENDIAN -fexceptions $(ARCH_FLAGS) $(HAVES) -DUSE_MPQLIB -LDFLAGS += -u gluNewTess -rdynamic -g -fexception -lpthread -lSegFault /usr/lib/libreadline.a /usr/lib/libncurses.a -lz -ldl -L/usr/lib/oracle/11.1.0.1/client/lib -Wl,--whole-archive ../Mesa-7.0.3/lib/libGLU.a ../Mesa-7.0.3/lib/libOSMesa.a -Wl,--no-whole-archive +BASIC_LDFLAGS = $(ARCH_FLAGS) -rdynamic -g -fexception -lz -ldl -lpthread -liconv + +LDFLAGS += $(BASIC_LDFLAGS) $(LDFLAGS_READLINE) -L/usr/lib/oracle/11.1.0.1/client/lib $(LDFLAGS_MESA) vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src @@ -192,7 +206,7 @@ all: dep luac lua-interface dep: $(ALL_DEPS) luac: $(LUAC_OBJECTS) - $(LD) -o luac $(LUAC_OBJECTS) $(LDFLAGS) + $(LD) -o luac $(LUAC_OBJECTS) $(BASIC_LDFLAGS) lua-interface: $(ALL_OBJECTS) $(LD) -o lua-interface $(ALL_OBJECTS) $(LDFLAGS) |