Thu, 28 Dec 2000 14:40:02 +0100
trunk: changeset 33
Makefile/path settings changes
6 | 1 | ## |
2 | ## Some make rules | |
3 | ## | |
4 | ||
5 | ###################################### | |
6 | ||
7 | ifdef SUBDIRS | |
8 | ||
9 | all: subdirs $(TARGETS) | |
10 | ||
11 | clean: subdirs-clean _clean | |
12 | ||
13 | realclean: subdirs-realclean _realclean | |
14 | ||
15 | depend: subdirs-depend _depend | |
16 | ||
17 | else | |
18 | ||
19 | all: $(TARGETS) | |
20 | ||
21 | clean: _clean | |
22 | ||
23 | realclean: _realclean | |
24 | ||
25 | depend: _depend | |
26 | ||
27 | endif | |
28 | ||
29 | ifdef INSTALL_SUBDIRS | |
30 | ||
31 | install: subdirs-install _install | |
32 | ||
33 | else | |
34 | ||
35 | install: _install | |
36 | ||
37 | endif | |
38 | ||
39 | ###################################### | |
40 | ||
41 | .c.o: | |
9 | 42 | $(CC) $(CFLAGS) -c $< -o $@ |
6 | 43 | |
29 | 44 | ifdef OBJS |
6 | 45 | |
29 | 46 | _clean: |
47 | rm -f core $(DEPEND_FILE) $(OBJS) | |
6 | 48 | |
49 | _depend: | |
8 | 50 | $(MAKE_DEPEND) *.c |
6 | 51 | |
29 | 52 | else |
53 | ||
54 | _clean: | |
55 | ||
56 | _depend: | |
57 | ||
58 | endif | |
59 | ||
60 | _realclean: _clean | |
61 | rm -f $(TARGETS) | |
62 | ||
63 | ||
6 | 64 | ###################################### |
65 | ||
66 | subdirs: | |
9 | 67 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done |
6 | 68 | |
69 | subdirs-depend: | |
9 | 70 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i depend; done |
6 | 71 | |
72 | subdirs-clean: | |
9 | 73 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done |
6 | 74 | |
75 | subdirs-realclean: | |
9 | 76 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i realclean; done |
6 | 77 | |
78 | subdirs-install: | |
9 | 79 | set -e; for i in $(INSTALL_SUBDIRS); do $(MAKE) -C $$i install; done |
6 | 80 | |
81 | ###################################### | |
82 | ||
83 | ifeq ($(DEPEND_FILE),$(wildcard $(DEPEND_FILE))) | |
84 | include $(DEPEND_FILE) | |
85 | endif |