George Sapountzis | 32a2a09 | 2008-04-18 17:34:24 +0300 | [diff] [blame^] | 1 | # src/mesa/drivers/xorg/Makefile |
| 2 | |
| 3 | TOP = ../../../.. |
| 4 | include $(TOP)/configs/current |
| 5 | |
| 6 | LIBNAME = libGLcore.so |
| 7 | |
| 8 | SYMLINKS = \ |
| 9 | glxheader.h \ |
| 10 | xmesaP.h \ |
| 11 | xm_api.c \ |
| 12 | xm_buffer.c \ |
| 13 | xm_dd.c \ |
| 14 | xm_image.c \ |
| 15 | xm_image.h \ |
| 16 | xm_line.c \ |
| 17 | xm_span.c \ |
| 18 | xm_tri.c |
| 19 | |
| 20 | C_SOURCES = \ |
| 21 | xm_api.c \ |
| 22 | xm_buffer.c \ |
| 23 | xm_dd.c \ |
| 24 | xm_image.c \ |
| 25 | xm_line.c \ |
| 26 | xm_span.c \ |
| 27 | xm_tri.c \ |
| 28 | glcore.c |
| 29 | |
| 30 | ######################################## |
| 31 | |
| 32 | MESA_MODULES = $(TOP)/src/mesa/libmesa.a |
| 33 | |
| 34 | C_SOURCES += ../common/driverfuncs.c |
| 35 | |
| 36 | OBJECTS = $(C_SOURCES:.c=.o) |
| 37 | |
| 38 | ### Include directories |
| 39 | INCLUDES = \ |
| 40 | -I. \ |
| 41 | -I.. \ |
| 42 | -I$(TOP)/include \ |
| 43 | -I$(TOP)/src/mesa \ |
| 44 | -I$(TOP)/src/mesa/main \ |
| 45 | -I$(TOP)/src/mesa/glapi \ |
| 46 | `pkg-config --cflags xorg-server` |
| 47 | |
| 48 | # undef 'USE_XSHM' to make it explicit that 'XFree86Server' takes precedence |
| 49 | DRIVER_DEFINES = -UUSE_XSHM -DXFree86Server |
| 50 | |
| 51 | ##### RULES ##### |
| 52 | |
| 53 | .c.o: |
| 54 | $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ |
| 55 | |
| 56 | |
| 57 | ##### TARGETS ##### |
| 58 | |
| 59 | default: depend symlinks $(LIBNAME) |
| 60 | |
| 61 | |
| 62 | $(LIBNAME): $(OBJECTS) $(MESA_MODULES) Makefile |
| 63 | $(TOP)/bin/mklib -noprefix -o $@ \ |
| 64 | $(OBJECTS) $(MESA_MODULES) $(GLCORE_LIB_DEPS) |
| 65 | |
| 66 | |
| 67 | depend: $(C_SOURCES) $(SYMLINKS) |
| 68 | touch depend |
| 69 | $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \ |
| 70 | > /dev/null |
| 71 | |
| 72 | |
| 73 | clean: |
| 74 | -rm -f *.o *.so $(SYMLINKS) |
| 75 | -rm -f depend depend.bak |
| 76 | |
| 77 | install: $(LIBNAME) |
| 78 | $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR) |
| 79 | $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR) |
| 80 | |
| 81 | $(SYMLINKS): |
| 82 | @[ -e $@ ] || ln -sf ../x11/$@ ./ |
| 83 | |
| 84 | symlinks: $(SYMLINKS) |
| 85 | |
| 86 | include depend |