diff options
author | Pixel <pixel@nobis-crew.org> | 2009-07-07 19:57:53 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-07-07 19:57:53 -0700 |
commit | 4a19ee400c7fe4fddaf1b99e63494f18a49fee2d (patch) | |
tree | 04a8d75e5a810f7b070a8f3d092b8fcfa6c459ec /Makefile | |
parent | c86ef9448280ef5f502efb3c475faa176c35aaef (diff) |
Switching to Mesa-7.4.4 and adding support for Darwin fat binaries.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 63 |
1 files changed, 54 insertions, 9 deletions
@@ -1,9 +1,10 @@ SYSTEM=$(shell uname) MACHINE=$(shell uname -m) DISTRIB=$(shell cat /etc/issue | cut -f 1 -d\ | head -1) +GL_GLUE=gl-glue.s ifeq ($(SYSTEM),Darwin) -ARCH_FLAGS= -LDFLAGS_MESA=-all_load ../Mesa-7.4.2/lib/libGLU.a ../Mesa-7.4.2/lib/libOSMesa.a +ARCH_FLAGS=-arch i386 -arch x86_64 -arch ppc -arch ppc64 +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 CPPFLAGS_READLINE= LDFLAGS_READLINE=-lreadline -lncurses SHARED_FLAGS=-dynamiclib @@ -13,10 +14,11 @@ LD = g++ LDFLAGS_GL = -L/usr/X11/lib -lGLU -lGL -X11 -dylib_file \ /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\ /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib +GL_GLUE=gl-glue-fat.o else ARCH_FLAGS=-march=i686 -m32 ASFLAGS=-march=i686 --32 -LDFLAGS_MESA=-u gluNewTess -Wl,--whole-archive ../Mesa-7.4.2/lib/libGLU.a ../Mesa-7.4.2/lib/libOSMesa.a -Wl,--no-whole-archive +LDFLAGS_MESA=-u gluNewTess -Wl,--whole-archive ../Mesa-7.4.4/lib/libGLU.a ../Mesa-7.4.4/lib/libOSMesa.a -Wl,--no-whole-archive CPPFLAGS_READLINE=-DREADLINE_STATIC LDFLAGS_READLINE=/usr/lib/libreadline.a /usr/lib/libncurses.a ifeq ($(MACHINE),x86_64) @@ -44,7 +46,7 @@ INCLUDES = \ -I../Baltisot/lib/lua/include -I../Baltisot/lib/lua/includes \ -I../lua-modules/src \ \ --I ../Mesa-7.4.2/include \ +-I ../Mesa-7.4.4/include \ -I ../tinyxml \ -I /usr/include/mysql \ -I /usr/include/FTGL -I /usr/include/freetype2 \ @@ -55,7 +57,8 @@ HAVES += -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_FCNTL -DHAVE_MYSQL -DHAVE_UNISTD_H LIBS += -lz -ldl -lpthread -CPPFLAGS += $(INCLUDES) -g -DSTDC_HEADERS $(CPPFLAGS_READLINE) -DHOOK_STDS -fexceptions -DWORDS_LITTLEENDIAN -fexceptions $(ARCH_FLAGS) $(HAVES) -DUSE_MPQLIB +CPPFLAGS_NO_ARCH += $(INCLUDES) -g -DSTDC_HEADERS $(CPPFLAGS_READLINE) -DHOOK_STDS -fexceptions -DWORDS_LITTLEENDIAN -fexceptions $(HAVES) -DUSE_MPQLIB +CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) BASIC_LDFLAGS += $(ARCH_FLAGS) $(LIBS) @@ -216,7 +219,7 @@ dvdabstract.cpp \ isobuilder.cpp \ yazedc.cpp \ -WHOLE_SOURCES = $(BALTISOT_SOURCES) $(LUA_SOURCES) $(LUAINTERFACE_SOURCES) gl-glue.s +WHOLE_SOURCES = $(BALTISOT_SOURCES) $(LUA_SOURCES) $(LUAINTERFACE_SOURCES) $(GL_GLUE) DEBUG_SOURCES = $(DEBUG_MODULES) LUAINTERFACE_OBJECTS = $(addsuffix .o, $(notdir $(basename $(LUAINTERFACE_SOURCES)))) @@ -258,13 +261,13 @@ clean: rm -f lua-interface-mesa lua-interface-gl luac *.o *.dep *.so *.dylib %.dep : %.c - $(CC) $(CPPFLAGS) -M -MF $@ $< + $(CC) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< %.dep : %.cpp - $(CXX) $(CPPFLAGS) -M -MF $@ $< + $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< %.dep : %.cc - $(CXX) $(CPPFLAGS) -M -MF $@ $< + $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< %.c : %.clua bin2c $< $@ $(basename $@) @@ -272,12 +275,54 @@ clean: %.clua : %.lua ./luac -o $@ $< +gl-glue-i386.dep: + touch gl-glue-i386.dep + +gl-glue-x86_64.dep: + touch gl-glue-x86_64.dep + +gl-glue-ppc.dep: + touch gl-glue-ppc.dep + +gl-glue-ppc64.dep: + touch gl-glue-ppc64.dep + gl-glue.dep: touch gl-glue.dep +gl-glue-fat.dep: + touch gl-glue-fat.dep + +gl-glue-i386.s: + src/generate-gl-glue.sh $(SYSTEM) i386 > gl-glue-i386.s + +gl-glue-x86_64.s: + src/generate-gl-glue.sh $(SYSTEM) x86_64 > gl-glue-x86_64.s + +gl-glue-ppc.s: + src/generate-gl-glue.sh $(SYSTEM) ppc > gl-glue-ppc.s + +gl-glue-ppc64.s: + src/generate-gl-glue.sh $(SYSTEM) ppc64 > gl-glue-ppc64.s + gl-glue.s: src/generate-gl-glue.sh > gl-glue.s +gl-glue-i386.o: gl-glue-i386.s + as -arch i386 $< -o $@ + +gl-glue-x86_64.o: gl-glue-x86_64.s + as -arch x86_64 $< -o $@ + +gl-glue-ppc.o: gl-glue-ppc.s + as -arch ppc $< -o $@ + +gl-glue-ppc64.o: gl-glue-ppc64.s + as -arch ppc64 $< -o $@ + +gl-glue-fat.o: gl-glue-i386.o gl-glue-x86_64.o gl-glue-ppc.o gl-glue-ppc64.o + lipo -create $^ -output $@ + -include $(ALL_DEPS) .PHONY: dist |