Merge commit 'origin/gallium-master-merge'
[mesa.git] / src / gallium / winsys / drm / nouveau / common / Makefile.template
1 # -*-makefile-*-
2
3 COMMON_SOURCES =
4
5 OBJECTS = $(C_SOURCES:.c=.o) \
6 $(CPP_SOURCES:.cpp=.o) \
7 $(ASM_SOURCES:.S=.o)
8
9
10 ### Include directories
11 INCLUDES = \
12 -I. \
13 -I$(TOP)/src/gallium/include \
14 -I$(TOP)/src/gallium/auxiliary \
15 -I$(TOP)/src/gallium/drivers \
16 -I$(TOP)/include \
17 $(DRIVER_INCLUDES)
18
19
20 ##### RULES #####
21
22 .c.o:
23 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
24
25 .cpp.o:
26 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
27
28 .S.o:
29 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
30
31
32 ##### TARGETS #####
33
34 default: depend symlinks lib$(LIBNAME).a
35
36
37 lib$(LIBNAME).a: $(OBJECTS) Makefile Makefile.template
38 $(TOP)/bin/mklib -o $(LIBNAME) -static $(OBJECTS) $(DRIVER_LIBS)
39
40
41 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
42 rm -f depend
43 touch depend
44 $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) \
45 $(ASM_SOURCES) 2> /dev/null
46
47
48 # Emacs tags
49 tags:
50 etags `find . -name \*.[ch]` `find ../include`
51
52
53 # Remove .o and backup files
54 clean::
55 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
56 -rm -f depend depend.bak
57
58
59 include depend