3 MESA_MODULES = $(TOP)/src/mesa/mesa.a
6 ../../common/driverfuncs.c \
11 ../common/dri_util.c \
12 ../common/xmlconfig.c \
13 ../common/drirenderbuffer.c
15 ifeq ($(WINDOW_SYSTEM),dri)
18 INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES) \
19 `pkg-config --cflags libdrm`
21 OBJECTS = $(C_SOURCES:.c=.o) \
26 WINLIB=-L$(MESA)/src/glx/mini
27 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
28 INCLUDES = $(MINIGLX_INCLUDES) \
29 -I$(DRM_SOURCE_PATH)/shared-core \
30 -I$(DRM_SOURCE_PATH)/libdrm \
33 OBJECTS = $(C_SOURCES:.c=.o) \
34 $(MINIGLX_SOURCES:.c=.o) \
39 ### Include directories
42 -I$(TOP)/src/mesa/drivers/dri/common \
44 -I$(DRM_SOURCE_PATH)/shared-core \
46 -I$(TOP)/include/GL/internal \
48 -I$(TOP)/src/mesa/main \
49 -I$(TOP)/src/mesa/glapi \
50 -I$(TOP)/src/mesa/math \
51 -I$(TOP)/src/mesa/transform \
52 -I$(TOP)/src/mesa/shader \
53 -I$(TOP)/src/mesa/swrast \
54 -I$(TOP)/src/mesa/swrast_setup \
55 -I$(TOP)/src/egl/main \
56 -I$(TOP)/src/egl/drivers/dri
61 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
64 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
69 default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME)
72 #$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
73 # @echo BUILDING FOR: $(WINDOW_SYSTEM)
74 # $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
75 # $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
77 # XXX we should use the mklib script here
78 $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
80 $(CC) $(ARCH_FLAGS) -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
83 $(LIB_DIR)/$(LIBNAME): $(LIBNAME)
84 install $(LIBNAME) $(LIB_DIR)
88 # Run 'make depend' to update the dependencies if you change
89 # what's included by any source file.
91 depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
93 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
99 etags `find . -name \*.[ch]` `find ../include`
102 # Remove .o and backup files
104 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
105 -rm -f depend depend.bak
108 install $(LIBNAME) /usr/X11R6/lib/modules/dri/$(LIBNAME)