If an application cleared before any state had been emitted, that clear would
[mesa.git] / src / mesa / drivers / dri / Makefile.template
1 # -*-makefile-*-
2
3 MESA_MODULES = $(TOP)/src/mesa/mesa.a
4
5
6 ifeq ($(WINDOW_SYSTEM),dri)
7 WINOBJ=../dri_client/dri.a
8 WINLIB=
9 INCLUDES = $(SHARED_INCLUDES) \
10 -I../dri_client \
11 -I../dri_client/imports
12
13 OBJECTS = $(C_SOURCES:.c=.o) \
14 $(ASM_SOURCES:.S=.o)
15
16 else
17 WINOBJ=
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 \
22 -I$(DRM_SOURCE_PATH)/libdrm \
23 $(SHARED_INCLUDES)
24
25 OBJECTS = $(C_SOURCES:.c=.o) \
26 $(MINIGLX_SOURCES:.c=.o) \
27 $(ASM_SOURCES:.S=.o)
28 endif
29
30
31
32
33
34 ### Include directories
35 SHARED_INCLUDES = \
36 -I. \
37 -I$(TOP)/src/mesa/drivers/dri/common \
38 -Iserver \
39 -I$(DRM_SOURCE_PATH)/shared \
40 -I$(DRM_SOURCE_PATH)/linux \
41 -I$(TOP)/include \
42 -I$(TOP)/include/GL/internal \
43 -I$(TOP)/src/mesa \
44 -I$(TOP)/src/mesa/main \
45 -I$(TOP)/src/mesa/glapi \
46 -I$(TOP)/src/mesa/math \
47 -I$(TOP)/src/mesa/transform \
48 -I$(TOP)/src/mesa/shader \
49 -I$(TOP)/src/mesa/swrast \
50 -I$(TOP)/src/mesa/swrast_setup
51
52 # Of course we're direct rendering. Redundant #ifdefs in the code
53 # from prehistory require this:
54 #
55 DEFINES += -DGLX_DIRECT_RENDERING
56
57 ##### RULES #####
58
59 .c.o:
60 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
61
62 .S.o:
63 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
64
65
66 ##### TARGETS #####
67
68 default: depend symlinks $(LIB_DIR)/$(LIBNAME)
69
70
71 #$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
72 # @echo BUILDING FOR: $(WINDOW_SYSTEM)
73 # $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
74 # $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
75
76
77 $(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
78 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(GL_LIB_DEPS)
79
80
81
82
83 # Run 'make depend' to update the dependencies if you change
84 # what's included by any source file.
85 depend: $(C_SOURCES) $(ASM_SOURCES)
86 touch depend
87 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
88 > /dev/null 2>&1
89
90
91 # Emacs tags
92 tags:
93 etags `find . -name \*.[ch]` `find ../include`
94
95
96 # Remove .o and backup files
97 clean:
98 -rm -f *.o */*.o *~ *.o *~ *.so server/*.o $(SYMLINKS) depend
99
100 include depend