Merge commit 'origin/gallium-master-merge'
[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)/include \
22 $(DRIVER_INCLUDES)
23
24
25 ##### RULES #####
26
27 .c.o:
28 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
29
30 .cpp.o:
31 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
32
33 .S.o:
34 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
35
36
37 ##### TARGETS #####
38
39 default: depend symlinks lib$(LIBNAME).a
40
41
42 lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
43 $(TOP)/bin/mklib -o $(LIBNAME) -static $(OBJECTS) $(DRIVER_LIBS)
44
45
46 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
47 rm -f depend
48 touch depend
49 $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) \
50 $(ASM_SOURCES) 2> /dev/null
51
52
53 # Emacs tags
54 tags:
55 etags `find . -name \*.[ch]` `find ../include`
56
57
58 # Remove .o and backup files
59 clean::
60 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
61 -rm -f depend depend.bak
62
63
64 include depend