Statistics
| Branch: | Revision:

iof-bird-daemon / tools / Makefile.in @ d8508f70

History | View | Annotate | Download (1.68 KB)

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

    
4
include Rules
5

    
6
.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
7

    
8
all: .dep-stamp subdir daemon @CLIENT@
9

    
10
daemon: $(exedir)/bird
11

    
12
client: $(exedir)/birdc
13

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

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

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

    
24
.dir-stamp:
25
	mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs)
26
	touch .dir-stamp
27

    
28
.dep-stamp:
29
	$(MAKE) depend
30
	touch .dep-stamp
31

    
32
docs: userdocs progdocs
33

    
34
userdocs progdocs: .dir-stamp
35
	$(MAKE) -C doc -f $(srcdir_abs)/doc/Makefile $@
36

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

    
40
install: all
41
	$(INSTALL) -d $(sbindir) $(sysconfdir)
42
	$(INSTALL_PROGRAM) -s $(exedir)/bird $(sbindir)/
43
	if test -n "@CLIENT@" ; then								\
44
		$(INSTALL_PROGRAM) -s $(exedir)/birdc $(sbindir)/ ;				\
45
	fi
46
	if ! test -f $(sysconfdir)/bird.conf ; then						\
47
		$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(sysconfdir)/bird.conf ;	\
48
	else											\
49
		echo "Not overwriting old bird.conf" ;						\
50
	fi
51

    
52
clean:
53
	find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
54
	rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
55

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