rules.mk

Mon, 02 Oct 2000 17:57:46 +0200

author
tuomov
date
Mon, 02 Oct 2000 17:57:46 +0200
changeset 24
c3fa6c2785dd
parent 17
a034888a2227
child 29
a2715cff4288
permissions
-rw-r--r--

trunk: changeset 27
Added missing TOK_INIT (could cause segfaults).

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

mercurial