3 MESA_MODULES = $(TOP)/src/mesa/mesa.a
6 ifeq ($(WINDOW_SYSTEM),dri)
7 WINOBJ=../dri_client/dri.a
9 INCLUDES = $(SHARED_INCLUDES) \
11 -I../dri_client/imports
13 OBJECTS = $(C_SOURCES:.c=.o) \
18 WINLIB=-L$(MESA)/src/glx/mini
19 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
20 INCLUDES = $(MINIGLX_INCLUDES) \
21 -I$(DRM_SOURCE_PATH)/shared-core \
22 -I$(DRM_SOURCE_PATH)/libdrm \
25 OBJECTS = $(C_SOURCES:.c=.o) \
26 $(MINIGLX_SOURCES:.c=.o) \
34 ### Include directories
37 -I$(TOP)/src/mesa/drivers/dri/common \
39 -I$(DRM_SOURCE_PATH)/shared-core \
41 -I$(TOP)/include/GL/internal \
43 -I$(TOP)/src/mesa/main \
44 -I$(TOP)/src/mesa/glapi \
45 -I$(TOP)/src/mesa/math \
46 -I$(TOP)/src/mesa/transform \
47 -I$(TOP)/src/mesa/shader \
48 -I$(TOP)/src/mesa/swrast \
49 -I$(TOP)/src/mesa/swrast_setup
51 # Of course we're direct rendering. Redundant #ifdefs in the code
52 # from prehistory require this:
54 DEFINES += -DGLX_DIRECT_RENDERING
59 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
62 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
67 default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME)
70 #$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
71 # @echo BUILDING FOR: $(WINDOW_SYSTEM)
72 # $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
73 # $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
75 $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
77 gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
80 $(LIB_DIR)/$(LIBNAME): $(LIBNAME)
81 install -C $(LIBNAME) $(LIB_DIR)
85 # Run 'make depend' to update the dependencies if you change
86 # what's included by any source file.
88 depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
90 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
96 etags `find . -name \*.[ch]` `find ../include`
99 # Remove .o and backup files
101 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
102 -rm -f depend depend.bak
105 install -C $(LIBNAME) /usr/X11R6/lib/modules/dri/$(LIBNAME)