Subversion Repositories shark

Rev

Rev 2 | 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::
14
	$(RM) *.o
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::
27
	$(CC) $(C_OPT) -M $(OBJS:.o=.c) > deps
28
 
29
deps:
30
	$(CC) $(C_OPT) -M $(OBJS:.o=.c) > deps
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