Statistics
| Branch: | Revision:

iof-bird-daemon / tools / Makefile.in @ 7211be1c

History | View | Annotate | Download (1.18 KB)

1
# Makefile for the BIRD Internet Routing Daemon
2
# (c) 1999--2000 Martin Mares <mj@ucw.cz>
3

    
4
include Rules
5

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

    
8
.PHONY: all daemon client subdir depend clean distclean tags
9

    
10
all: .dep-stamp subdir daemon @CLIENT@
11

    
12
daemon: $(exedir)/bird
13

    
14
client: $(exedir)/birdc
15

    
16
subdir depend: .dir-stamp
17
	set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
18
	set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
19

    
20
$(exedir)/bird: $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
21
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
22

    
23
$(exedir)/birdc: client/all.o lib/birdlib.a
24
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
25

    
26
.dir-stamp:
27
	mkdir -p $(static-dirs) $(client-dirs)
28
	touch .dir-stamp
29

    
30
.dep-stamp:
31
	$(MAKE) depend
32
	touch .dep-stamp
33

    
34
tags:
35
	cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
36

    
37
clean:
38
	find . -name "*.[oa]" -or -name core -or -name depend | xargs rm -f
39
	rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
40

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