2 # Mesa 3-D graphics library
4 # Copyright (C) 1995-2002 Brian Paul
10 SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver -I../drm/shared
11 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
21 -DGLX_DIRECT_RENDERING
23 MINIGLX_SOURCES = server/r128_dri.c
38 ../../common/driverfuncs.c \
45 INCLUDES = $(MINIGLX_INCLUDES) \
49 C_SOURCES = $(DRIVER_SOURCES) \
52 MESA_MODULES = $(TOP)/src/mesa/mesa.a
55 ifeq ($(WINDOW_SYSTEM),dri)
56 WINOBJ=$(MESABUILDDIR)/dri/dri.a
60 WINLIB=-L$(MESA)/src/glx/mini
64 OBJECTS = $(C_SOURCES:.c=.o) \
67 ### Include directories
72 -I$(TOP)/src/mesa/main \
73 -I$(TOP)/src/mesa/glapi \
74 -I$(TOP)/src/mesa/math \
75 -I$(TOP)/src/mesa/transform \
76 -I$(TOP)/src/mesa/swrast \
77 -I$(TOP)/src/mesa/swrast_setup
83 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
86 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
91 targets: depend r128_dri.so
93 r128_dri.so: $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.solo
94 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS)
95 rm -f $(TOP)/lib/r128_dri.so && \
96 install r128_dri.so $(TOP)/lib/r128_dri.so
98 $(TOP)/lib/r128_dri.so: r128_dri.so
99 rm -f $(TOP)/lib/r128_dri.so && \
100 install r128_dri.so $(TOP)/lib/r128_dri.so
102 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
103 # what's included by any source file.
104 depend: $(C_SOURCES) $(ASM_SOURCES)
105 makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) \
106 $(C_SOURCES) $(ASM_SOURCES)
111 etags `find . -name \*.[ch]` `find ../include`
114 # Remove .o and backup files
116 -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
119 include $(TOP)/Make-config