Statistics
| Branch: | Revision:

iof-bird-daemon / Makefile @ 25697773

History | View | Annotate | Download (1012 Bytes)

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

    
4
TOPDIR=$(shell pwd)
5
OBJDIR=obj
6

    
7
CPPFLAGS=-I$(TOPDIR)/sysdep/linux -I$(TOPDIR)
8
OPT=-O2
9
DEBUG=-g#gdb
10
CFLAGS=$(OPT) $(DEBUG) -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses
11

    
12
PROTOCOLS=
13
LIBDIRS=sysdep/linux sysdep/unix lib
14
STDDIRS=nest $(PROTOCOLS)
15
DIRS=$(STDDIRS) $(OBJDIR)/lib
16
PARTOBJS=$(join $(addsuffix /,$(STDDIRS)),$(subst /,_,$(addsuffix .o,$(STDDIRS))))
17
LIBS=$(OBJDIR)/lib/birdlib.a
18

    
19
export
20

    
21
all: .dep all-dirs bird
22

    
23
all-dirs:
24
	set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a all ; done
25

    
26
bird: $(PARTOBJS) $(LIBS)
27
	$(CC) $(LDFLAGS) -o $@ $^
28

    
29
.dep:
30
	$(MAKE) dep
31

    
32
dep:
33
	mkdir -p $(OBJDIR)
34
	tools/mergedirs $(OBJDIR) $(LIBDIRS)
35
#	for a in $(STDDIRS) ; do mkdir -p $(OBJDIR)/$$a ; done
36
	set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a dep ; done
37
	touch .dep
38

    
39
clean:
40
	rm -rf obj
41
	rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
42
	rm -f bird .dep