1999-01-10 08:18:32 +08:00
|
|
|
# Makefile for the BIRD Internet Routing Daemon
|
2000-01-19 23:07:00 +08:00
|
|
|
# (c) 1999--2000 Martin Mares <mj@ucw.cz>
|
1999-01-10 08:18:32 +08:00
|
|
|
|
|
|
|
include Rules
|
|
|
|
|
|
|
|
srcdir_abs := $(shell cd $(srcdir) ; pwd)
|
|
|
|
|
2000-01-19 23:07:00 +08:00
|
|
|
.PHONY: all daemon client subdir depend clean distclean tags
|
1999-01-10 08:18:32 +08:00
|
|
|
|
2000-01-19 23:07:00 +08:00
|
|
|
all: .dep-stamp subdir daemon @CLIENT@
|
|
|
|
|
|
|
|
daemon: $(exedir)/bird
|
|
|
|
|
|
|
|
client: $(exedir)/birdc
|
1999-01-10 08:18:32 +08:00
|
|
|
|
1999-04-12 03:28:16 +08:00
|
|
|
subdir depend: .dir-stamp
|
1999-01-10 08:18:32 +08:00
|
|
|
set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
|
1999-10-29 17:44:44 +08:00
|
|
|
set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
|
1999-01-10 08:18:32 +08:00
|
|
|
|
|
|
|
$(exedir)/bird: $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
|
1999-03-04 19:36:26 +08:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
1999-01-10 08:18:32 +08:00
|
|
|
|
1999-10-29 17:44:44 +08:00
|
|
|
$(exedir)/birdc: client/all.o lib/birdlib.a
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
|
1999-01-10 08:18:32 +08:00
|
|
|
.dir-stamp:
|
1999-10-29 17:44:44 +08:00
|
|
|
mkdir -p $(static-dirs) $(client-dirs)
|
1999-01-10 08:18:32 +08:00
|
|
|
touch .dir-stamp
|
|
|
|
|
|
|
|
.dep-stamp:
|
|
|
|
$(MAKE) depend
|
|
|
|
touch .dep-stamp
|
|
|
|
|
1999-04-12 03:28:16 +08:00
|
|
|
tags:
|
1999-10-29 17:44:44 +08:00
|
|
|
cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
|
1999-04-12 03:28:16 +08:00
|
|
|
|
1999-01-10 08:18:32 +08:00
|
|
|
clean:
|
1999-04-01 23:33:52 +08:00
|
|
|
find . -name "*.[oa]" -or -name core -or -name depend | xargs rm -f
|
1999-10-31 23:43:44 +08:00
|
|
|
rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
|
1999-01-10 08:18:32 +08:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f config.* configure sysdep/autoconf.h Makefile Rules
|
|
|
|
rm -rf .dir-stamp $(clean-dirs)
|