Statistics
| Branch: | Revision:

iof-bird-daemon / tools / Makefile.in @ 99955b54

History | View | Annotate | Download (2.06 KB)

1 49e7e5ee Martin Mares
# Makefile for the BIRD Internet Routing Daemon
2 9fac310d Martin Mares
# (c) 1999--2000 Martin Mares <mj@ucw.cz>
3 49e7e5ee Martin Mares
4
include Rules
5
6 b1777248 Martin Mares
.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
7 49e7e5ee Martin Mares
8 f9254d23 Martin Mares
all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
9 9fac310d Martin Mares
10
daemon: $(exedir)/bird
11
12
client: $(exedir)/birdc
13 49e7e5ee Martin Mares
14 ed9a8236 Martin Mares
subdir depend: .dir-stamp
15 49e7e5ee Martin Mares
	set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
16 ed608150 Martin Mares
	set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
17 49e7e5ee Martin Mares
18
$(exedir)/bird: $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
19 7a2105be Martin Mares
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
20 49e7e5ee Martin Mares
21 ed608150 Martin Mares
$(exedir)/birdc: client/all.o lib/birdlib.a
22 7211be1c Martin Mares
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
23 ed608150 Martin Mares
24 49e7e5ee Martin Mares
.dir-stamp:
25 b1777248 Martin Mares
	mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs)
26 49e7e5ee Martin Mares
	touch .dir-stamp
27
28
.dep-stamp:
29
	$(MAKE) depend
30
	touch .dep-stamp
31
32 b1777248 Martin Mares
docs: userdocs progdocs
33
34
userdocs progdocs: .dir-stamp
35
	$(MAKE) -C doc -f $(srcdir_abs)/doc/Makefile $@
36
37 f9254d23 Martin Mares
sysdep/paths.h:
38
	echo >sysdep/paths.h "/* Generated by Makefile, don't edit manually! */"
39
	echo >>sysdep/paths.h "#define PATH_CONFIG_DIR \"$(sysconfdir)\""
40
	echo >>sysdep/paths.h "#define PATH_CONTROL_SOCKET_DIR \"$(localstatedir)\""
41
42 ed9a8236 Martin Mares
tags:
43 ed608150 Martin Mares
	cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
44 ed9a8236 Martin Mares
45 d8508f70 Martin Mares
install: all
46 f9254d23 Martin Mares
	$(INSTALL) -d $(sbindir) $(sysconfdir) $(localstatedir)
47 d8508f70 Martin Mares
	$(INSTALL_PROGRAM) -s $(exedir)/bird $(sbindir)/
48
	if test -n "@CLIENT@" ; then								\
49
		$(INSTALL_PROGRAM) -s $(exedir)/birdc $(sbindir)/ ;				\
50
	fi
51
	if ! test -f $(sysconfdir)/bird.conf ; then						\
52
		$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(sysconfdir)/bird.conf ;	\
53
	else											\
54
		echo "Not overwriting old bird.conf" ;						\
55
	fi
56
57 99955b54 Martin Mares
install-docs:
58
	$(INSTALL) -d $(docdir)
59
	$(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(docdir)/
60
61 49e7e5ee Martin Mares
clean:
62 b1777248 Martin Mares
	find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
63 b9672a84 Martin Mares
	rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
64 49e7e5ee Martin Mares
65
distclean: clean
66 f9254d23 Martin Mares
	rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules
67 49e7e5ee Martin Mares
	rm -rf .dir-stamp $(clean-dirs)