1998-04-22 20:58:34 +08:00
|
|
|
# Makefile for the BIRD Internet Routing Daemon
|
|
|
|
# (c) 1998 Martin Mares <mj@ucw.cz>
|
|
|
|
|
|
|
|
TOPDIR=$(shell pwd)
|
1998-05-04 00:43:39 +08:00
|
|
|
CPPFLAGS=-I$(TOPDIR)/sysdep/linux -I$(TOPDIR)
|
|
|
|
OPT=-O2
|
|
|
|
DEBUG=-g#gdb
|
|
|
|
CFLAGS=$(OPT) $(DEBUG) -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses
|
1998-04-22 20:58:34 +08:00
|
|
|
|
|
|
|
PROTOCOLS=
|
1998-05-04 00:43:39 +08:00
|
|
|
DIRS=nest $(PROTOCOLS) lib sysdep/linux sysdep/unix
|
1998-04-22 20:58:34 +08:00
|
|
|
ARCHS=$(join $(addsuffix /,$(DIRS)),$(subst /,_,$(addsuffix .a,$(DIRS))))
|
|
|
|
|
|
|
|
export
|
|
|
|
|
1998-04-28 22:39:34 +08:00
|
|
|
all: .dep all-dirs bird
|
1998-04-22 20:58:34 +08:00
|
|
|
|
|
|
|
all-dirs:
|
|
|
|
set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a ; done
|
|
|
|
|
|
|
|
bird: $(ARCHS)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^
|
|
|
|
|
1998-04-28 22:39:34 +08:00
|
|
|
.dep:
|
|
|
|
$(MAKE) dep
|
|
|
|
touch .dep
|
|
|
|
|
|
|
|
dep:
|
|
|
|
set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a dep ; done
|
|
|
|
|
1998-04-22 20:58:34 +08:00
|
|
|
clean:
|
1998-05-04 00:43:39 +08:00
|
|
|
rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
|
1998-04-28 22:39:34 +08:00
|
|
|
rm -f bird .dep
|