diff options
author | Martin Mares <mj@ucw.cz> | 1998-04-28 16:39:34 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-04-28 16:39:34 +0200 |
commit | 1feea03e7463d8eaeb00d5df6c2cd3e8e20f2bcd (patch) | |
tree | 70ba86e2c60b759f7740c0d28e6abdaaf60241ea /Rules | |
parent | c40e05a0dffa33a8724e56121a2b6dcdfa9183e0 (diff) | |
download | bird-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 'Rules')
-rw-r--r-- | Rules | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -4,9 +4,26 @@ THISDIR=$(shell pwd) RELDIR=$(subst $(TOPDIR)/,,$(THISDIR)) ANAME=$(subst /,_,$(RELDIR)).a +SRCS=$(subst .o,.c,$(OBJS)) all: $(ANAME) $(ANAME): $(OBJS) rm -f $(ANAME) ar rcs $(ANAME) $(OBJS) + +ifdef OBJS + +dep: $(SRCS) + rm -f .depend + for a in $(SRCS) ; do gcc $(CPPFLAGS) -MM $$a >>.depend ; done + +else + +dep: + +endif + +ifneq ($(wildcard .depend),) +include .depend +endif |