Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1901 | serge | 1 | # src/glsl/Makefile.template |
2 | |||
3 | # Template makefile for glsl 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 | |||
14 | ### Basic defines ### |
||
15 | |||
16 | OBJECTS = $(C_SOURCES:.c=.o) |
||
17 | |||
18 | INCLUDES = \ |
||
19 | -I. \ |
||
20 | $(LIBRARY_INCLUDES) |
||
21 | |||
22 | |||
23 | ##### TARGETS ##### |
||
24 | |||
25 | default: depend lib$(LIBNAME).a |
||
26 | |||
27 | lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/glsl/Makefile.template |
||
28 | $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) |
||
29 | |||
30 | depend: $(C_SOURCES) |
||
31 | rm -f depend |
||
32 | touch depend |
||
33 | $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) 2> /dev/null |
||
34 | |||
35 | # Remove .o and backup files |
||
36 | clean: |
||
37 | rm -f $(OBJECTS) lib$(LIBNAME).a depend depend.bak |
||
38 | |||
39 | # Dummy target |
||
40 | install: |
||
41 | @echo -n "" |
||
42 | |||
43 | |||
44 | ##### RULES ##### |
||
45 | |||
46 | .c.o: |
||
47 | $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ |
||
48 | |||
49 | -include depend> |
||
50 |