OSDN Git Service

i915: Respect mfeatures.h.
[android-x86/external-mesa.git] / src / gallium / Makefile.template
1 # src/gallium/Makefile.template
2
3 # Template makefile for gallium libraries.
4 #
5 # Usage:
6 #   The minimum that the including makefile needs to define
7 #   is TOP, LIBNAME and one of of the *_SOURCES.
8 #
9 # Optional defines:
10 #   LIBRARY_INCLUDES are appended to the list of includes directories.
11 #   LIBRARY_DEFINES is not used for makedepend, but for compilation.
12
13 ### Basic defines ###
14
15 OBJECTS = $(C_SOURCES:.c=.o) \
16         $(CPP_SOURCES:.cpp=.o) \
17         $(ASM_SOURCES:.S=.o)
18
19 INCLUDES = \
20         -I. \
21         -I$(TOP)/src/gallium/include \
22         -I$(TOP)/src/gallium/auxiliary \
23         -I$(TOP)/src/gallium/drivers \
24         -I$(GALLIUM)/src/gallium/include \
25         -I$(GALLIUM)/src/gallium/auxiliary \
26         -I$(GALLIUM)/src/gallium/drivers \
27         $(LIBRARY_INCLUDES)
28
29
30 ##### TARGETS #####
31
32 default: depend lib$(LIBNAME).a
33
34 lib$(LIBNAME).a: $(OBJECTS) $(EXTRA_OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
35         $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) $(EXTRA_OBJECTS)
36
37 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
38         rm -f depend
39         touch depend
40         $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) 2> /dev/null
41
42 # Emacs tags
43 tags:
44         etags `find . -name \*.[ch]` `find $(TOP)/src/gallium/include -name \*.h`
45
46 # Remove .o and backup files
47 clean:
48         rm -f $(OBJECTS) lib$(LIBNAME).a depend depend.bak
49
50 # Dummy target
51 install:
52         @echo -n ""
53
54 ##### RULES #####
55
56 .c.o:
57         $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
58
59 .cpp.o:
60         $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@
61
62 .S.o:
63         $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES)  $< -o $@
64
65
66 sinclude depend