summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-12-07 09:08:36 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-12-07 09:08:36 +0100
commitf00444e8af75be583f3c83eea87c3d4fc228e809 (patch)
treef5e293df2155be2b66ce9b79fdff946b6de88171
parent3c35e11315ae592e95cc02c25c313a5a32cb50a1 (diff)
Darwin9 ftw.
-rw-r--r--Makefile21
1 files changed, 19 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4279f36..0bc2019 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,14 @@
+ifeq ($(SYSTEM),)
SYSTEM=$(shell uname)
+endif
+TRUESYSTEM=$(shell uname)
+MACHINE=$(shell uname -m)
+DISTRIB=$(shell cat /etc/issue | cut -f 1 -d\ | head -1)
+GL_GLUE=gl-glue.s
+CC = gcc
+CXX = g++
+LD = g++
+AS = as
ifeq ($(SYSTEM),Darwin)
ARCH_FLAGS=-arch i386
SHARED_FLAGS=-dynamiclib
@@ -6,6 +16,15 @@ SHARED_EXT=dylib
CPPFLAGS = -dynamic
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 -arch i386
+LIPO = i686-apple-darwin9-lipo
+ARCH_FLAGS =
+endif
else
ARCH_FLAGS=-march=i686 -m32
SHARED_FLAGS=-shared
@@ -13,8 +32,6 @@ SHARED_EXT=so
LD = g++ -m32
STRIP = strip --strip-unneeded
endif
-CC = gcc
-CXX = g++
INCLUDES = \
-I../Baltisot/include \