Populate WriteMonoDepthSpan in 24/8 modes.
[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-core \
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-core \
40 -I$(TOP)/include \
41 -I$(TOP)/include/GL/internal \
42 -I$(TOP)/src/mesa \
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
50
51 # Of course we're direct rendering. Redundant #ifdefs in the code
52 # from prehistory require this:
53 #
54 DEFINES += -DGLX_DIRECT_RENDERING
55
56 ##### RULES #####
57
58 .c.o:
59 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
60
61 .S.o:
62 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
63
64
65 ##### TARGETS #####
66
67 default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME)
68
69
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)
74
75 $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
76 rm -f $@
77 gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
78
79
80 $(LIB_DIR)/$(LIBNAME): $(LIBNAME)
81 install $(LIBNAME) $(LIB_DIR)
82
83
84
85 # Run 'make depend' to update the dependencies if you change
86 # what's included by any source file.
87 .PHONY: depend
88 depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
89 touch depend
90 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
91 > /dev/null
92
93
94 # Emacs tags
95 tags:
96 etags `find . -name \*.[ch]` `find ../include`
97
98
99 # Remove .o and backup files
100 clean:
101 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
102 -rm -f depend depend.bak
103
104 install: $(LIBNAME)
105 install $(LIBNAME) /usr/X11R6/lib/modules/dri/$(LIBNAME)
106
107 include depend