0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-14 15:18:44 +00:00
bird/tools/Makefile.in

68 lines
2.1 KiB
Makefile
Raw Normal View History

# Makefile for the BIRD Internet Routing Daemon
# (c) 1999--2000 Martin Mares <mj@ucw.cz>
include Rules
.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
daemon: $(exedir)/bird
client: $(exedir)/birdc
subdir depend: .dir-stamp
set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
$(exedir)/bird: $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
$(exedir)/birdc: client/all.o lib/birdlib.a
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
.dir-stamp:
mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs)
touch .dir-stamp
.dep-stamp:
$(MAKE) depend
touch .dep-stamp
docs: userdocs progdocs
userdocs progdocs: .dir-stamp
$(MAKE) -C doc -f $(srcdir_abs)/doc/Makefile $@
sysdep/paths.h:
echo >sysdep/paths.h "/* Generated by Makefile, don't edit manually! */"
echo >>sysdep/paths.h "#define PATH_CONFIG_DIR \"$(sysconfdir)\""
echo >>sysdep/paths.h "#define PATH_CONTROL_SOCKET_DIR \"$(localstatedir)/run\""
tags:
cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
2000-05-08 13:54:59 +00:00
install: all
$(INSTALL) -d $(sbindir) $(sysconfdir) $(localstatedir)
2000-05-08 13:54:59 +00:00
$(INSTALL_PROGRAM) -s $(exedir)/bird $(sbindir)/
if test -n "@CLIENT@" ; then \
$(INSTALL_PROGRAM) -s $(exedir)/birdc $(sbindir)/ ; \
fi
if ! test -f $(sysconfdir)/bird.conf ; then \
$(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(sysconfdir)/bird.conf ; \
else \
echo "Not overwriting old bird.conf" ; \
fi
install-docs:
$(INSTALL) -d $(docdir)
$(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(docdir)/
clean:
find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
1999-10-31 15:43:44 +00:00
rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl .dep-stamp
distclean: clean
rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules
rm -rf .dir-stamp $(clean-dirs)