diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-23 02:54:13 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-23 02:54:13 +0200 |
commit | 32622d0ea366406f3afa14bb9edb4855d6979786 (patch) | |
tree | 9ccfb9c0e165658e54f82da1d9de2c9bb3348f5a /tools | |
parent | efd6d12b975441c7e1875a59dd9e0f3db7e958cb (diff) | |
parent | a5e9f3d26f887deb451a3ea086e52266c117aa0a (diff) |
Merge branch 'birdcl'
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.in | 23 | ||||
-rw-r--r-- | tools/Rules.in | 8 |
2 files changed, 24 insertions, 7 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in index 728e5797..feb83b9f 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -3,22 +3,31 @@ include Rules -.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs +.PHONY: all daemon birdc birdcl subdir depend clean distclean tags docs userdocs progdocs -all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@ +all: sysdep/paths.h .dep-stamp subdir daemon birdcl @CLIENT@ daemon: $(exedir)/bird -client: $(exedir)/birdc +birdc: $(exedir)/birdc + +birdcl: $(exedir)/birdcl bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a $(bird-dep): sysdep/paths.h .dep-stamp subdir -birdc-dep := client/all.o lib/birdlib.a +birdc-dep := client/birdc.o client/all.o lib/birdlib.a $(birdc-dep): sysdep/paths.h .dep-stamp subdir +birdcl-dep := client/birdcl.o client/all.o lib/birdlib.a + +$(birdcl-dep): sysdep/paths.h .dep-stamp subdir + + +export client := @CLIENT@ + depend: sysdep/paths.h .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 @@ -33,6 +42,9 @@ $(exedir)/bird: $(bird-dep) $(exedir)/birdc: $(birdc-dep) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS) +$(exedir)/birdcl: $(birdcl-dep) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + .dir-stamp: sysdep/paths.h mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs) touch .dir-stamp @@ -58,6 +70,7 @@ tags: install: all $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@ $(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX@ + $(INSTALL_PROGRAM) -s $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl@SUFFIX@ if test -n "@CLIENT@" ; then \ $(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX@ ; \ fi @@ -74,7 +87,7 @@ install-docs: clean: find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h - rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp + rm -f $(exedir)/bird $(exedir)/birdcl $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp distclean: clean rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules diff --git a/tools/Rules.in b/tools/Rules.in index fc06aeb1..ca930ec8 100644 --- a/tools/Rules.in +++ b/tools/Rules.in @@ -11,7 +11,7 @@ static-dirs := nest filter $(addprefix proto/,$(protocols)) static-dir-paths := $(addprefix $(srcdir)/,$(static-dirs)) dynamic-dirs := lib conf dynamic-dir-paths := $(dynamic-dirs) -client-dirs := @CLIENT@ +client-dirs := client client-dir-paths := $(client-dirs) doc-dirs := doc doc-dir-paths := $(doc-dirs) @@ -75,8 +75,12 @@ endif %.o: $(src-path)%.c $(CC) $(CFLAGS) -o $@ -c $< +ifndef source-dep +source-dep := $(source) +endif + depend: - $(CC) $(CPPFLAGS) -MM $(addprefix $(src-path),$(source)) >depend + $(CC) $(CPPFLAGS) -MM $(addprefix $(src-path),$(source-dep)) >depend ifneq ($(wildcard depend),) include depend |