Renamed package to ion1, and made it conflict with package 'ion'.
[ion1.git] / rules.mk
blob37887a826749a23657de1a0c0bd5b2fb245e99bf
1 ##
2 ## Some make rules
3 ##
5 ######################################
7 ifdef SUBDIRS
9 all: subdirs $(TARGETS)
11 clean: subdirs-clean _clean
13 realclean: subdirs-realclean _realclean
15 depend: subdirs-depend _depend
17 else
19 all: $(TARGETS)
21 clean: _clean
23 realclean: _realclean
25 depend: _depend
27 endif
29 ifdef INSTALL_SUBDIRS
31 install: subdirs-install _install
33 else
35 install: _install
37 endif
39 ######################################
41 .c.o:
42 $(CC) $(CFLAGS) -c $< -o $@
44 ifdef OBJS
46 _clean:
47 rm -f core $(DEPEND_FILE) $(OBJS)
49 _depend:
50 $(MAKE_DEPEND) *.c
52 else
54 _clean:
56 _depend:
58 endif
60 _realclean: _clean
61 rm -f $(TARGETS)
64 ######################################
66 subdirs:
67 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
69 subdirs-depend:
70 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i depend; done
72 subdirs-clean:
73 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
75 subdirs-realclean:
76 set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i realclean; done
78 subdirs-install:
79 set -e; for i in $(INSTALL_SUBDIRS); do $(MAKE) -C $$i install; done
81 ######################################
83 ifeq ($(DEPEND_FILE),$(wildcard $(DEPEND_FILE)))
84 include $(DEPEND_FILE)
85 endif