Subversion Repositories shark

Rev

Rev 65 | 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 sub-library
3
#
4
 
5
.PHONY: all install clean cleanall depend
6
 
7
#
8
 
9
install:: all
10
	make -C .. copylibrary
11
 
12
all:: $(OBJS)
13
	$(AR) rs ../lib$(LIBRARY).a $(OBJS)
14
 
15
clean::
16
	$(RM) *.o
17
	$(RM) *.err
18
 
19
cleanall:: clean
20
	$(RM) deps
21
	$(RM) *.bak
22
	$(RM) *.~
23
	$(RM) *.?~
24
	$(RM) *.??~
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
 
1025 mauro 38
# Common rules
39
%.o : %.s
40
	$(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $<
41
%.o : %.c
42
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<
43
%.s : %.c
44
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $<
45
%.o : %.cpp
46
	$(REDIR) $(CPP) $(C_OPT) $(C_OUTPUT) -c $<
47
 
2 pj 48
#../lib$(LIBRARY).a: $(OBJS)
49
#	$(AR) rs ../lib$(LIBRARY).a $(OBJS)
50
 
51
 
52
 
53