Statistics
| Branch: | Revision:

iof-bird-daemon / tools / Makefile.in @ 71a9574a

History | View | Annotate | Download (2.41 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: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
9

    
10
daemon: $(exedir)/bird
11

    
12
client: $(exedir)/birdc
13

    
14
bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
15

    
16
$(bird-dep): sysdep/paths.h .dep-stamp subdir
17

    
18
birdc-dep := client/all.o lib/birdlib.a
19

    
20
$(birdc-dep): sysdep/paths.h .dep-stamp subdir
21

    
22
subdir depend: sysdep/paths.h .dir-stamp
23
	set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
24
	set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
25

    
26
$(exedir)/bird: $(bird-dep)
27
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
28

    
29
$(exedir)/birdc: $(birdc-dep)
30
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
31

    
32
.dir-stamp: sysdep/paths.h
33
	mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs)
34
	touch .dir-stamp
35

    
36
.dep-stamp:
37
	$(MAKE) depend
38
	touch .dep-stamp
39

    
40
docs: userdocs progdocs
41

    
42
userdocs progdocs: .dir-stamp
43
	$(MAKE) -C doc -f $(srcdir_abs)/doc/Makefile $@
44

    
45
sysdep/paths.h:
46
	echo >sysdep/paths.h "/* Generated by Makefile, don't edit manually! */"
47
	echo >>sysdep/paths.h "#define PATH_CONFIG_DIR \"$(sysconfdir)\""
48
	echo >>sysdep/paths.h "#define PATH_CONTROL_SOCKET_DIR \"$(localstatedir)/run\""
49

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

    
53
install: all
54
	$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(localstatedir)
55
	$(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX6@
56
	if test -n "@CLIENT@" ; then								\
57
		$(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX6@ ;				\
58
	fi
59
	if ! test -f $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; then						\
60
		$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ;	\
61
	else											\
62
		echo "Not overwriting old bird@SUFFIX@.conf" ;						\
63
	fi
64

    
65
install-docs:
66
	$(INSTALL) -d $(DESTDIR)/$(docdir)
67
	$(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
68

    
69
clean:
70
	find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
71
	rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
72

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