Makefile.in 960 Bytes
Newer Older
1
2
3
4
5
6
7
# Makefile for the BIRD Internet Routing Daemon
# (c) 1999 Martin Mares <mj@ucw.cz>

include Rules

srcdir_abs := $(shell cd $(srcdir) ; pwd)

8
.PHONY: all subdir depend clean distclean tags
9

10
all: .dep-stamp subdir $(exedir)/bird
11

12
subdir depend: .dir-stamp
13
14
15
16
	set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
	set -e ; for a in $(static-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done

$(exedir)/bird: $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
17
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
18
19
20
21
22
23
24
25
26

.dir-stamp:
	mkdir -p $(static-dirs)
	touch .dir-stamp

.dep-stamp:
	$(MAKE) depend
	touch .dep-stamp

27
28
29
tags:
	cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) -name *.[chY]`

30
clean:
31
	find . -name "*.[oa]" -or -name core -or -name depend | xargs rm -f
32
33
34
35
36
	rm -f $(exedir)/bird .dep-stamp

distclean: clean
	rm -f config.* configure sysdep/autoconf.h Makefile Rules
	rm -rf .dir-stamp $(clean-dirs)