summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-04-28 16:39:34 +0200
committerMartin Mares <mj@ucw.cz>1998-04-28 16:39:34 +0200
commit1feea03e7463d8eaeb00d5df6c2cd3e8e20f2bcd (patch)
tree70ba86e2c60b759f7740c0d28e6abdaaf60241ea /Makefile
parentc40e05a0dffa33a8724e56121a2b6dcdfa9183e0 (diff)
downloadbird-1feea03e7463d8eaeb00d5df6c2cd3e8e20f2bcd.tar
bird-1feea03e7463d8eaeb00d5df6c2cd3e8e20f2bcd.zip
Changed #include <x/y> to #include "x/y" for our local includes, so that
gcc -MM can be used to separate them from the system ones. Added automatic generation of dependencies.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0c62fe5..77f9ee1 100644
--- a/Makefile
+++ b/Makefile
@@ -2,15 +2,16 @@
# (c) 1998 Martin Mares <mj@ucw.cz>
TOPDIR=$(shell pwd)
-CFLAGS=-O2 -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses -I$(TOPDIR)
+CPPFLAGS=-I$(TOPDIR)
+CFLAGS=-O2 -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses $(CPPFLAGS)
PROTOCOLS=
-DIRS=sysdep/linux nest $(protocols) lib
+DIRS=sysdep/linux nest $(PROTOCOLS) lib
ARCHS=$(join $(addsuffix /,$(DIRS)),$(subst /,_,$(addsuffix .a,$(DIRS))))
export
-all: all-dirs bird
+all: .dep all-dirs bird
all-dirs:
set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a ; done
@@ -18,6 +19,13 @@ all-dirs:
bird: $(ARCHS)
$(CC) $(LDFLAGS) -o $@ $^
+.dep:
+ $(MAKE) dep
+ touch .dep
+
+dep:
+ set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a dep ; done
+
clean:
- rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core`
- rm -f bird
+ rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend`
+ rm -f bird .dep