rules.mk

Wed, 19 Apr 2000 22:44:45 +0200

author
tuomov
date
Wed, 19 Apr 2000 22:44:45 +0200
changeset 7
6b608d438597
parent 6
f73065173121
child 8
c1994196683f
permissions
-rw-r--r--

trunk: changeset 10
Fixed system.mk

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

mercurial