Makefile revision ad503c41557606d15b0420c824369456f6d20a8f
1INSTALL_DIR = /usr/X11 2X11_DIR = $(INSTALL_DIR) 3 4CC=gcc 5GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT -DGLX_USE_APPLEGL -DGLX_ALIAS_UNSUPPORTED $(RC_CFLAGS) $(CFLAGS) 6GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module 7 8TCLSH=tclsh8.5 9 10MKDIR=mkdir 11INSTALL=install 12LN=ln 13RM=rm 14 15INCLUDE=-I. -Iinclude -Iinclude/internal -I.. -I../../../include -I$(INSTALL_DIR)/include -I$(X11_DIR)/include 16COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c 17 18#The directory with the final binaries. 19BUILD_DIR=builds 20 21all: $(BUILD_DIR)/libGL.1.2.dylib 22 23OBJECTS=glxext.o glxcmds.o glx_pbuffer.o glx_query.o glxcurrent.o glxextensions.o \ 24 appledri.o apple_glx_context.o apple_glx.o pixel.o \ 25 compsize.o apple_visual.o apple_cgl.o glxreply.o glcontextmodes.o \ 26 apple_xgl_api.o apple_glx_drawable.o xfont.o apple_glx_pbuffer.o \ 27 apple_glx_pixmap.o apple_xgl_api_read.o glx_empty.o glx_error.o \ 28 apple_xgl_api_viewport.o apple_glx_surface.o apple_xgl_api_stereo.o 29 30$(BUILD_DIR)/libGL.1.2.dylib: $(OBJECTS) 31 -if ! test -d $(BUILD_DIR); then $(MKDIR) $(BUILD_DIR); fi 32 $(CC) $(GL_CFLAGS) -o $@ -dynamiclib -install_name $(INSTALL_DIR)/lib/libGL.1.dylib -compatibility_version 1.2 -current_version 1.2 -lXplugin -framework ApplicationServices -framework CoreFoundation $(GL_LDFLAGS) -lXext -lX11 -Wl,-exported_symbols_list,exports.list $(OBJECTS) 33 34.c.o: 35 $(COMPILE) $< 36 37apple_glx_drawable.o: apple_glx_drawable.h apple_glx_drawable.c include/GL/gl.h 38apple_xgl_api.o: apple_xgl_api.h apple_xgl_api.c apple_xgl_api_stereo.c include/GL/gl.h 39apple_xgl_api_read.o: apple_xgl_api_read.h apple_xgl_api_read.c apple_xgl_api.h include/GL/gl.h 40apple_xgl_api_viewport.o: apple_xgl_api_viewport.h apple_xgl_api_viewport.c apple_xgl_api.h include/GL/gl.h 41apple_xgl_api_stereo.o: apple_xgl_api_stereo.h apple_xgl_api_stereo.c apple_xgl_api.h include/GL/gl.h 42glcontextmodes.o: glcontextmodes.c include/GL/gl.h 43glxext.o: glxext.c include/GL/gl.h 44glxreply.o: glxreply.c include/GL/gl.h 45glxcmds.o: glxcmds.c apple_glx_context.h include/GL/gl.h 46glx_pbuffer.o: glx_pbuffer.c include/GL/gl.h 47glx_error.o: glx_error.c include/GL/gl.h 48glx_query.o: glx_query.c include/GL/gl.h 49glxcurrent.o: glxcurrent.c include/GL/gl.h 50glxextensions.o: glxextensions.c include/GL/gl.h 51glxhash.o: glxhash.h glxhash.c include/GL/gl.h 52appledri.o: appledri.h appledristr.h appledri.c include/GL/gl.h 53apple_glx_context.o: apple_glx_context.c apple_glx_context.h apple_glx_context.h include/GL/gl.h 54apple_glx.o: apple_glx.h apple_glx.c apple_xgl_api.h include/GL/gl.h 55apple_visual.o: apple_visual.h apple_visual.c include/GL/gl.h 56apple_cgl.o: apple_cgl.h apple_cgl.c include/GL/gl.h 57apple_glx_pbuffer.o: apple_glx_drawable.h apple_glx_pbuffer.c include/GL/gl.h 58apple_glx_pixmap.o: apple_glx_drawable.h apple_glx_pixmap.c appledri.h include/GL/gl.h 59apple_glx_surface.o: apple_glx_drawable.h apple_glx_surface.c appledri.h include/GL/gl.h 60xfont.o: xfont.c include/GL/gl.h 61compsize.o: compsize.c include/GL/gl.h 62renderpix.o: renderpix.c include/GL/gl.h 63singlepix.o: singlepix.c include/GL/gl.h 64pixel.o: pixel.c include/GL/gl.h 65glx_empty.o: glx_empty.c include/GL/gl.h 66 67apple_xgl_api.c: apple_xgl_api.h 68apple_xgl_api.h: gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl 69 $(TCLSH) gen_code.tcl 70 71include/GL/gl.h: include/GL/gl.h.template gen_gl_h.sh 72 ./gen_gl_h.sh include/GL/gl.h.template $@ 73 74install_headers: include/GL/gl.h 75 $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL 76 $(INSTALL) -m 644 include/GL/gl.h include/GL/glext.h include/GL/glx.h include/GL/glxext.h $(DESTDIR)$(INSTALL_DIR)/include/GL 77 78install_libraries: $(BUILD_DIR)/libGL.1.2.dylib 79 $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/lib 80 $(INSTALL) -m 755 $(BUILD_DIR)/libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib 81 $(RM) -f $(DESTDIR)$(INSTALL_DIR)/lib/libGL.dylib 82 $(LN) -s libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib/libGL.dylib 83 $(RM) -f $(DESTDIR)$(INSTALL_DIR)/lib/libGL.1.dylib 84 $(LN) -s libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib/libGL.1.dylib 85 86install: install_headers install_libraries 87 88clean: 89 rm -rf $(BUILD_DIR) 90 rm -f *.o *.a 91 rm -f *.c~ *.h~ 92 rm -f apple_xgl_api.h apple_xgl_api.c 93 rm -f *.dylib 94 rm -f include/GL/gl.h 95 96%.c : ../%.c 97 ln -s $< 98