summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1a64e86..249ad13 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,13 @@
+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++
ifeq ($(SYSTEM),Darwin)
ARCH_FLAGS=-arch i386
LDFLAGS_MESA=-all_load ../Mesa-7.4.4/lib/libGLU.a ../Mesa-7.4.4/lib/libmesa.a ../Mesa-7.4.4/lib/libglapi.a ../Mesa-7.4.4/lib/osmesa.o
@@ -16,6 +22,13 @@ LDFLAGS_GL = -L/usr/X11/lib -lGLU -lGL -X11 -dylib_file \
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
GL_GLUE=gl-glue-fat.o
STRIP = strip -x
+ifeq ($(TRUESYSTEM),Linux)
+CC = i686-apple-darwin9-gcc-4.0.1
+CXX = i686-apple-darwin9-g++-4.0.1
+LD = i686-apple-darwin9-ld -arch i386
+STRIP = i686-apple-darwin9-strip -x
+ARCH_FLAGS =
+endif
else
ARCH_FLAGS=-march=i686 -m32
ASFLAGS=-march=i686 --32
@@ -39,8 +52,6 @@ LD = g++ -m32
LDFLAGS_GL = -lGLU -lGL
STRIP = strip --strip-unneeded
endif
-CC = gcc
-CXX = g++
INCLUDES = \
-I../mogltk/include \