diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-12-07 04:07:04 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-12-07 04:07:04 +0100 |
commit | e11a3a9965d85f41827c10fa243f4727d2f4adf0 (patch) | |
tree | dd1fc023e42d5d5e4109688d0b1ba5664a4dcb32 /Makefile | |
parent | e0715718af5ece286fbb01559fd7d2861def02ff (diff) |
darwin9 cross-compiler friendly.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 22 insertions, 8 deletions
@@ -1,13 +1,29 @@ +ifeq ($(SYSTEM),) SYSTEM=$(shell uname) +endif +TRUESYSTEM=$(shell uname) +CC = gcc +CXX = g++ +FINK_PREFIX= ifeq ($(SYSTEM),Darwin) ARCH_FLAGS=-arch i386 SHARED_FLAGS=-dynamiclib SHARED_EXT=dylib -SQL_LIBS=/sw/lib/mysql/libmysqlclient.a -lz OSMESA_LIBS = -lMagick++ -lMagick -lWand -lMagick -CPPFLAGS = -dynamic +CPPFLAGS = LD = g++ -arch i386 STRIP = strip -x +ifeq ($(TRUESYSTEM),Linux) +CC = i686-apple-darwin9-gcc +CXX = i686-apple-darwin9-g++ +LD = i686-apple-darwin9-g++ -arch i386 +STRIP = i686-apple-darwin9-strip -x +AS = i686-apple-darwin9-as +LIPO = i686-apple-darwin9-lipo +FINK_PREFIX=/usr/i686-apple-darwin9 +ARCH_FLAGS = +endif +SQL_LIBS=$(FINK_PREFIX)/sw/lib/mysql/libmysqlclient.a -lz else ARCH_FLAGS=-march=i686 -m32 SHARED_FLAGS=-shared @@ -17,8 +33,6 @@ OSMESA_LIBS = `Magick++-config --libs` LD = g++ -m32 STRIP = strip --strip-unneeded endif -CC = gcc -CXX = g++ HAVE_ORACLE=$(shell [ -d /usr/local/instantclient ] || [ -e /usr/include/oracle/11.1/client/occi.h ] || [ -e /usr/bin/sqlplus ] && echo true || echo false ]) @@ -30,22 +44,22 @@ INCLUDES = \ -I../Baltisot/lib/zlib/include \ -I../LuaJIT/src \ -I ../tinyxml \ --I /sw/include/mysql \ +-I $(FINK_PREFIX)/sw/include/mysql \ -I /usr/include/mysql \ -I /usr/include/FTGL \ -I /usr/local/include/FTGL \ -I /usr/include/freetype2 \ --I /sw/include \ +-I $(FINK_PREFIX)/sw/include \ -I /usr/local/instantclient/sdk/include \ -I /usr/X11/include/freetype2 -I /usr/X11/include \ -I /usr/include/oracle/11.1.0.1/client 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_NO_ARCH += $(INCLUDES) -O4 -fexceptions -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN $(HAVES) -DUSE_OSMESA +CPPFLAGS_NO_ARCH += $(INCLUDES) -O4 -fexceptions -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN $(HAVES) -DUSE_OSMESA -DNDEBUG CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) -LDFLAGS += $(ARCH_FLAGS) $(SHARED_FLAGS) -L/usr/lib/oracle/11.1.0.1/client/lib -L/usr/X11/lib -L/sw/lib -L/usr/local/instantclient ./lua-interface.$(SHARED_EXT) +LDFLAGS += $(ARCH_FLAGS) $(SHARED_FLAGS) -L/usr/lib/oracle/11.1.0.1/client/lib -L/usr/X11/lib -L$(FINK_PREFIX)/sw/lib -L/usr/local/instantclient ./lua-interface.$(SHARED_EXT) vpath %.c ../Baltisot/lib:../Baltisot/src:src:../mogltk/lib:../tinyxml vpath %.cc ../Baltisot/lib:../Baltisot/src:src:../mogltk/lib:../tinyxml |