Rev 48 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | # |
2 | # Dependency rules used to make a library |
||
3 | # |
||
4 | |||
5 | .PHONY: all install clean cleanall depend |
||
6 | |||
7 | # |
||
8 | |||
9 | install:: $(LIB_PATH)/lib$(LIBRARY).a all |
||
10 | |||
11 | all:: lib$(LIBRARY).a |
||
12 | |||
13 | clean:: |
||
48 | pj | 14 | $(RM) $(OBJS) *.o |
2 | pj | 15 | $(RM) *.err |
16 | $(RM) lib$(LIBRARY).a |
||
17 | |||
18 | cleanall:: clean |
||
19 | $(RM) deps |
||
20 | $(RM) *.bak |
||
21 | $(RM) *.~ |
||
22 | $(RM) *.?~ |
||
23 | $(RM) *.??~ |
||
24 | $(RM) $(LIBRARYPATHNAME) |
||
25 | |||
26 | depend:: |
||
65 | pj | 27 | $(CC) $(C_OPT) -M $(wildcard $(OBJS:.o=.c) $(OBJS:.o=.s)) > deps |
2 | pj | 28 | |
29 | deps: |
||
65 | pj | 30 | $(CC) $(C_OPT) -M $(wildcard $(OBJS:.o=.c) $(OBJS:.o=.s)) > deps |
2 | pj | 31 | |
32 | ifneq ($(MAKECMDGOALS),clean) |
||
33 | ifneq ($(MAKECMDGOALS),cleanall) |
||
34 | include deps |
||
35 | endif |
||
36 | endif |
||
37 | |||
38 | lib$(LIBRARY).a: $(OBJS) |
||
39 | $(AR) rs lib$(LIBRARY).a $(OBJS) |
||
40 | |||
41 | $(LIB_PATH)/lib$(LIBRARY).a: lib$(LIBRARY).a |
||
42 | $(CP) lib$(LIBRARY).a $(LIBRARYDIR) |
||
43 |