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-15 15:56:13 +08:00
|
|
|
OBJDIR=obj
|
|
|
|
|
1998-05-24 22:44:25 +08:00
|
|
|
CPPFLAGS=-I$(TOPDIR)/$(OBJDIR) -I$(TOPDIR)
|
1998-05-04 00:43:39 +08:00
|
|
|
OPT=-O2
|
|
|
|
DEBUG=-g#gdb
|
|
|
|
CFLAGS=$(OPT) $(DEBUG) -Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses
|
1998-04-22 20:58:34 +08:00
|
|
|
|
1998-12-07 02:21:23 +08:00
|
|
|
PROTOCOLS=rip static
|
1998-05-15 15:56:13 +08:00
|
|
|
LIBDIRS=sysdep/linux sysdep/unix lib
|
1998-11-28 03:37:07 +08:00
|
|
|
BASEDIRS=nest $(addprefix proto/,$(PROTOCOLS))
|
|
|
|
STDDIRS=$(BASEDIRS) $(OBJDIR)/conf
|
1998-05-15 15:56:13 +08:00
|
|
|
DIRS=$(STDDIRS) $(OBJDIR)/lib
|
|
|
|
PARTOBJS=$(join $(addsuffix /,$(STDDIRS)),$(subst /,_,$(addsuffix .o,$(STDDIRS))))
|
|
|
|
LIBS=$(OBJDIR)/lib/birdlib.a
|
1998-04-22 20:58:34 +08:00
|
|
|
|
|
|
|
export
|
|
|
|
|
1998-04-28 22:39:34 +08:00
|
|
|
all: .dep all-dirs bird
|
1998-04-22 20:58:34 +08:00
|
|
|
|
|
|
|
all-dirs:
|
1998-05-20 19:54:33 +08:00
|
|
|
set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a this ; done
|
1998-04-22 20:58:34 +08:00
|
|
|
|
1998-05-15 15:56:13 +08:00
|
|
|
bird: $(PARTOBJS) $(LIBS)
|
1998-04-22 20:58:34 +08:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^
|
|
|
|
|
1998-04-28 22:39:34 +08:00
|
|
|
.dep:
|
|
|
|
$(MAKE) dep
|
|
|
|
|
|
|
|
dep:
|
1998-05-15 15:56:13 +08:00
|
|
|
mkdir -p $(OBJDIR)
|
|
|
|
tools/mergedirs $(OBJDIR) $(LIBDIRS)
|
|
|
|
# for a in $(STDDIRS) ; do mkdir -p $(OBJDIR)/$$a ; done
|
1998-04-28 22:39:34 +08:00
|
|
|
set -e ; for a in $(DIRS) ; do $(MAKE) -C $$a dep ; done
|
1998-05-15 15:56:13 +08:00
|
|
|
touch .dep
|
1998-04-28 22:39:34 +08:00
|
|
|
|
1998-04-22 20:58:34 +08:00
|
|
|
clean:
|
1998-05-15 15:56:13 +08:00
|
|
|
rm -rf obj
|
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
|
1999-01-09 23:02:11 +08:00
|
|
|
rm -f config.log config.cache config.status configure sysdep/autoconf.h
|