Statistics
| Branch: | Revision:

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

History | View | Annotate | Download (1.09 KB)

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

    
4
include Rules
5

    
6
srcdir_abs := $(shell cd $(srcdir) ; pwd)
7

    
8
.PHONY: all subdir depend clean distclean tags
9

    
10
all: .dep-stamp subdir $(exedir)/bird $(exedir)/birdc
11

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

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

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

    
22
.dir-stamp:
23
	mkdir -p $(static-dirs) $(client-dirs)
24
	touch .dir-stamp
25

    
26
.dep-stamp:
27
	$(MAKE) depend
28
	touch .dep-stamp
29

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

    
33
clean:
34
	find . -name "*.[oa]" -or -name core -or -name depend | xargs rm -f
35
	rm -f $(exedir)/bird $(exedir)/birdc .dep-stamp
36

    
37
distclean: clean
38
	rm -f config.* configure sysdep/autoconf.h Makefile Rules
39
	rm -rf .dir-stamp $(clean-dirs)