gallium: add target-helpers/wrap_screen.c to C_SOURCES
[mesa/mesa-lb.git] / src / gallium / Makefile.template
blob91a9b54b3628b72f0867938283a199869fd86a66
1 # src/gallium/Makefile.template
3 # Template makefile for gallium libraries.
5 # Usage:
6 #   The minimum that the including makefile needs to define
7 #   is TOP, LIBNAME and one of of the *_SOURCES.
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.
13 ### Basic defines ###
15 OBJECTS = $(C_SOURCES:.c=.o) \
16         $(CPP_SOURCES:.cpp=.o) \
17         $(ASM_SOURCES:.S=.o)
19 INCLUDES = \
20         -I. \
21         -I$(TOP)/src/gallium/include \
22         -I$(TOP)/src/gallium/auxiliary \
23         -I$(TOP)/src/gallium/drivers \
24         $(LIBRARY_INCLUDES)
27 ##### TARGETS #####
29 default: depend lib$(LIBNAME).a
31 lib$(LIBNAME).a: $(OBJECTS) $(EXTRA_OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
32         $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) $(EXTRA_OBJECTS)
34 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
35         rm -f depend
36         touch depend
37         $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null
39 # Emacs tags
40 tags:
41         etags `find . -name \*.[ch]` `find $(TOP)/src/gallium/include -name \*.h`
43 # Remove .o and backup files
44 clean:
45         rm -f $(OBJECTS) $(GENERATED_SOURCES) lib$(LIBNAME).a depend depend.bak
47 # Dummy target
48 install:
49         @echo -n ""
51 ##### RULES #####
53 %.s: %.c
54         $(CC) -S $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
56 %.o: %.c
57         $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
59 %.o: %.cpp
60         $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@
62 %.o: %.S
63         $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES)  $< -o $@
66 sinclude depend