radeon/r200/r300: cleanup some of the renderbuffer code
[mesa.git] / src / gallium / winsys / drm / Makefile.template
1 # -*-makefile-*-
2
3 MESA_MODULES = \
4 $(TOP)/src/mesa/libmesagallium.a \
5 $(GALLIUM_AUXILIARIES)
6
7 COMMON_GALLIUM_SOURCES = \
8 $(TOP)/src/mesa/drivers/dri/common/utils.c \
9 $(TOP)/src/mesa/drivers/dri/common/vblank.c \
10 $(TOP)/src/mesa/drivers/dri/common/dri_util.c \
11 $(TOP)/src/mesa/drivers/dri/common/xmlconfig.c
12
13 COMMON_SOURCES = $(COMMON_GALLIUM_SOURCES) \
14 $(TOP)/src/mesa/drivers/common/driverfuncs.c \
15 $(TOP)/src/mesa/drivers/dri/common/texmem.c \
16 $(TOP)/src/mesa/drivers/dri/common/drirenderbuffer.c
17
18 COMMON_BM_SOURCES = \
19 $(TOP)/src/mesa/drivers/dri/common/dri_bufmgr.c \
20 $(TOP)/src/mesa/drivers/dri/common/dri_drmpool.c
21
22
23 ifeq ($(WINDOW_SYSTEM),dri)
24 WINOBJ=
25 WINLIB=
26 INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
27
28 OBJECTS = \
29 $(C_SOURCES:.c=.o) \
30 $(ASM_SOURCES:.S=.o)
31
32 else
33 # miniglx
34 WINOBJ=
35 WINLIB=-L$(MESA)/src/glx/mini
36 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
37 INCLUDES = $(MINIGLX_INCLUDES) \
38 $(SHARED_INCLUDES) \
39 $(PCIACCESS_CFLAGS)
40
41 OBJECTS = $(C_SOURCES:.c=.o) \
42 $(MINIGLX_SOURCES:.c=.o) \
43 $(ASM_SOURCES:.S=.o)
44 endif
45
46
47 ### Include directories
48 SHARED_INCLUDES = \
49 -I. \
50 -I$(TOP)/src/mesa/drivers/dri/common \
51 -Iserver \
52 -I$(TOP)/include \
53 -I$(TOP)/include/GL/internal \
54 -I$(TOP)/src/gallium/include \
55 -I$(TOP)/src/gallium/auxiliary \
56 -I$(TOP)/src/gallium/drivers \
57 -I$(TOP)/src/gallium/winsys/common \
58 -I$(TOP)/src/mesa \
59 -I$(TOP)/src/mesa/main \
60 -I$(TOP)/src/mesa/glapi \
61 -I$(TOP)/src/mesa/math \
62 -I$(TOP)/src/mesa/transform \
63 -I$(TOP)/src/mesa/shader \
64 -I$(TOP)/src/mesa/swrast \
65 -I$(TOP)/src/mesa/swrast_setup \
66 -I$(TOP)/src/egl/main \
67 -I$(TOP)/src/egl/drivers/dri \
68 $(LIBDRM_CFLAGS)
69
70
71 ##### RULES #####
72
73 .c.o:
74 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
75
76 .S.o:
77 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
78
79
80 ##### TARGETS #####
81
82 default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME) $(LIBNAME_EGL) $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME_EGL)
83
84
85 $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
86 $(TOP)/bin/mklib -noprefix -o $@ \
87 $(OBJECTS) $(PIPE_DRIVERS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS) $(DRIVER_EXTRAS)
88
89 $(LIBNAME_EGL): $(WINSYS_OBJECTS) $(LIBS)
90 $(TOP)/bin/mklib -o $(LIBNAME_EGL) \
91 -linker "$(CC)" \
92 -noprefix \
93 $(OBJECTS) $(MKLIB_OPTIONS) $(WINSYS_OBJECTS) $(PIPE_DRIVERS) $(WINOBJ) $(DRI_LIB_DEPS) \
94 --whole-archive $(LIBS) $(GALLIUM_AUXILIARIES) --no-whole-archive $(DRIVER_EXTRAS)
95
96 $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(LIBNAME)
97 $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium
98
99 $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME_EGL): $(LIBNAME_EGL)
100 $(INSTALL) $(LIBNAME_EGL) $(TOP)/$(LIB_DIR)/gallium
101
102 depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
103 rm -f depend
104 touch depend
105 $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
106 $(ASM_SOURCES) 2> /dev/null
107
108
109 # Emacs tags
110 tags:
111 etags `find . -name \*.[ch]` `find ../include`
112
113
114 # Remove .o and backup files
115 clean:
116 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
117 -rm -f depend depend.bak
118
119
120 install: $(LIBNAME)
121 $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
122 $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
123
124
125 include depend