1 # src/gallium/Makefile.template
3 # Template makefile for gallium libraries.
6 # The minimum that the including makefile needs to define
7 # is TOP, LIBNAME and one of of the *_SOURCES.
10 # LIBRARY_INCLUDES are appended to the list of includes directories.
11 # LIBRARY_DEFINES is not used for makedepend, but for compilation.
15 OBJECTS = $(C_SOURCES:.c=.o) \
16 $(CPP_SOURCES:.cpp=.o) \
21 -I$(TOP)/src/gallium/include \
22 -I$(TOP)/src/gallium/auxiliary \
23 -I$(TOP)/src/gallium/drivers \
29 default: depend lib$(LIBNAME).a $(PROGS)
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)
37 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null
40 $(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS) -Wl,--end-group
44 etags `find . -name \*.[ch]` `find $(TOP)/src/gallium/include -name \*.h`
46 # Remove .o and backup files
48 rm -f $(OBJECTS) $(GENERATED_SOURCES) $(PROGS) lib$(LIBNAME).a depend depend.bak $(CLEAN_EXTRA)
57 $(CC) -S $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
60 $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
63 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@
66 $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@