6698212e77ee443da6f27ee8dd737c46d56c7310
[mesa.git] / src / gallium / Makefile.template
1 # -*-makefile-*-
2
3
4 # We still have a dependency on the "dri" buffer manager. Most likely
5 # the interface can be reused in non-dri environments, and also as a
6 # frontend to simpler memory managers.
7 #
8 COMMON_SOURCES =
9
10 OBJECTS = $(C_SOURCES:.c=.o) \
11 $(CPP_SOURCES:.cpp=.o) \
12 $(ASM_SOURCES:.S=.o)
13
14
15 ### Include directories
16 INCLUDES = \
17 -I. \
18 -I$(TOP)/src/gallium/include \
19 -I$(TOP)/src/gallium/auxiliary \
20 -I$(TOP)/src/gallium/drivers \
21 -I$(TOP)/src/mesa \
22 -I$(TOP)/src/mesa/main \
23 -I$(TOP)/include \
24 $(DRIVER_INCLUDES)
25
26
27 ##### RULES #####
28
29 .c.o:
30 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
31
32 .cpp.o:
33 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
34
35 .S.o:
36 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
37
38
39 ##### TARGETS #####
40
41 default: depend symlinks $(LIBNAME)
42
43
44 $(LIBNAME): $(OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
45 $(TOP)/bin/mklib -o $@ -static $(OBJECTS) $(DRIVER_LIBS)
46
47
48 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
49 rm -f depend
50 touch depend
51 $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) \
52 $(ASM_SOURCES) 2> /dev/null
53
54
55 # Emacs tags
56 tags:
57 etags `find . -name \*.[ch]` `find ../include`
58
59
60 # Remove .o and backup files
61 clean::
62 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
63 -rm -f depend depend.bak
64
65
66 include depend