rules.mk

Mon, 17 Feb 2003 23:24:47 +0100

author
tuomov
date
Mon, 17 Feb 2003 23:24:47 +0100
changeset 43
aad48c3d4966
parent 29
a2715cff4288
child 51
2d95d77aa954
permissions
-rw-r--r--

trunk: changeset 46
UNLINK_ITEM fixed to reset next/previous pointers to NULL

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
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
44 ifdef OBJS
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
45
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
46 _clean:
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
47 rm -f core $(DEPEND_FILE) $(OBJS)
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
48
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
49 _depend:
8
c1994196683f trunk: changeset 11
tuomov
parents: 6
diff changeset
50 $(MAKE_DEPEND) *.c
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
51
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
52 else
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
53
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
54 _clean:
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
55
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
56 _depend:
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
57
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
58 endif
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
59
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
60 _realclean: _clean
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
61 rm -f $(TARGETS)
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
62
a2715cff4288 trunk: changeset 32
tuomov
parents: 17
diff changeset
63
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
64 ######################################
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
65
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
66 subdirs:
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
67 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
68
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
69 subdirs-depend:
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
70 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i depend; done
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
71
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
72 subdirs-clean:
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
73 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
74
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
75 subdirs-realclean:
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
76 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i realclean; done
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
77
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
78 subdirs-install:
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
79 set -e; for i in $(INSTALL_SUBDIRS); do $(MAKE) -C $$i install; done
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
80
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
81 ######################################
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
82
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
83 ifeq ($(DEPEND_FILE),$(wildcard $(DEPEND_FILE)))
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
84 include $(DEPEND_FILE)
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
85 endif

mercurial