Merge branch '7.8'
[mesa.git] / src / gallium / targets / Makefile.dri
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 INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
23
24 OBJECTS = \
25 $(C_SOURCES:.c=.o) \
26 $(ASM_SOURCES:.S=.o)
27
28
29 ### Include directories
30 SHARED_INCLUDES = \
31 -I. \
32 -I$(TOP)/src/mesa/drivers/dri/common \
33 -Iserver \
34 -I$(TOP)/include \
35 -I$(TOP)/include/GL/internal \
36 -I$(TOP)/src/gallium/include \
37 -I$(TOP)/src/gallium/auxiliary \
38 -I$(TOP)/src/gallium/drivers \
39 -I$(TOP)/src/gallium/winsys/common \
40 -I$(TOP)/src/mesa \
41 -I$(TOP)/src/mesa/main \
42 -I$(TOP)/src/mesa/glapi \
43 -I$(TOP)/src/mesa/math \
44 -I$(TOP)/src/mesa/transform \
45 -I$(TOP)/src/mesa/shader \
46 -I$(TOP)/src/mesa/swrast \
47 -I$(TOP)/src/mesa/swrast_setup \
48 -I$(TOP)/src/egl/main \
49 -I$(TOP)/src/egl/drivers/dri \
50 $(LIBDRM_CFLAGS)
51
52
53 ##### RULES #####
54
55 .c.o:
56 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
57
58 .S.o:
59 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
60
61
62 ##### TARGETS #####
63
64 default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
65
66 $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) Makefile \
67 $(TOP)/src/mesa/drivers/dri/Makefile.template $(TOP)/src/mesa/drivers/dri/common/dri_test.o
68 $(MKLIB) -o $@.tmp -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
69 $(OBJECTS) $(PIPE_DRIVERS) \
70 -Wl,--start-group $(MESA_MODULES) -Wl,--end-group \
71 $(DRI_LIB_DEPS) $(DRIVER_EXTRAS)
72 $(CC) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS)
73 @rm -f $@.test
74 mv -f $@.tmp $@
75
76 $(TOP)/$(LIB_DIR)/gallium:
77 mkdir -p $@
78
79 $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium
80 $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium
81
82 depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
83 rm -f depend
84 touch depend
85 $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
86 $(ASM_SOURCES) 2> /dev/null
87
88
89 # Emacs tags
90 tags:
91 etags `find . -name \*.[ch]` `find ../include`
92
93
94 # Remove .o and backup files
95 clean:
96 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
97 -rm -f depend depend.bak
98
99
100 install: $(LIBNAME)
101 $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
102 $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
103
104
105 include depend