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
24 # MINIGLX_SOURCES = server/sis_dri.c
41 ../../common/driverfuncs.c \
47 INCLUDES = $(MINIGLX_INCLUDES) \
51 C_SOURCES = $(DRIVER_SOURCES) \
54 MESA_MODULES = $(TOP)/src/mesa/mesa.a
57 ifeq ($(WINDOW_SYSTEM),dri)
58 WINOBJ=$(MESABUILDDIR)/dri/dri.a
62 WINLIB=-L$(MESA)/src/glx/mini
66 OBJECTS = $(C_SOURCES:.c=.o) \
69 ### Include directories
74 -I$(TOP)/src/mesa/main \
75 -I$(TOP)/src/mesa/glapi \
76 -I$(TOP)/src/mesa/math \
77 -I$(TOP)/src/mesa/transform \
78 -I$(TOP)/src/mesa/swrast \
79 -I$(TOP)/src/mesa/swrast_setup
85 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
88 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
93 targets: depend sis_dri.so
95 sis_dri.so: $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.solo
96 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS)
97 rm -f $(TOP)/lib/sis_dri.so && \
98 install sis_dri.so $(TOP)/lib/sis_dri.so
100 $(TOP)/lib/sis_dri.so: sis_dri.so
101 rm -f $(TOP)/lib/sis_dri.so && \
102 install sis_dri.so $(TOP)/lib/sis_dri.so
104 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
105 # what's included by any source file.
106 depend: $(C_SOURCES) $(ASM_SOURCES)
107 makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) \
108 $(C_SOURCES) $(ASM_SOURCES)
113 etags `find . -name \*.[ch]` `find ../include`
116 # Remove .o and backup files
118 -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
121 include $(TOP)/Make-config