2004-04-16 04:56:59 +08:00
|
|
|
DESTDIR=
|
2004-06-10 05:28:11 +08:00
|
|
|
SBINDIR=/usr/sbin
|
2004-04-16 04:56:59 +08:00
|
|
|
CONFDIR=/etc/iproute2
|
|
|
|
DOCDIR=/usr/doc/iproute2
|
2004-08-31 06:37:50 +08:00
|
|
|
MANDIR=/usr/share/man
|
2004-04-16 04:56:59 +08:00
|
|
|
|
2004-06-26 05:20:20 +08:00
|
|
|
# Path to db_185.h include
|
|
|
|
DBM_INCLUDE:=/usr/include
|
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
DEFINES= -DRESOLVE_HOSTNAMES
|
|
|
|
|
|
|
|
#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
|
|
|
|
LDLIBS=-lresolv
|
|
|
|
ADDLIB=
|
|
|
|
|
|
|
|
#options for decnet
|
|
|
|
ADDLIB+=dnet_ntop.o dnet_pton.o
|
|
|
|
|
|
|
|
#options for ipx
|
|
|
|
ADDLIB+=ipx_ntop.o ipx_pton.o
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
2004-08-05 01:45:52 +08:00
|
|
|
CFLAGS = $(CCOPTS) -I../include $(DEFINES)
|
2004-04-16 04:56:59 +08:00
|
|
|
|
|
|
|
LDLIBS += -L../lib -lnetlink -lutil
|
|
|
|
|
|
|
|
SUBDIRS=lib ip tc misc
|
|
|
|
|
|
|
|
LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
|
|
|
|
|
2004-06-26 05:14:22 +08:00
|
|
|
all: Config
|
|
|
|
@for i in $(SUBDIRS); \
|
|
|
|
do $(MAKE) $(MFLAGS) -C $$i; done
|
|
|
|
|
|
|
|
Config:
|
|
|
|
./configure $(KERNEL_INCLUDE)
|
2004-04-16 04:56:59 +08:00
|
|
|
|
|
|
|
install: all
|
|
|
|
install -m 0755 -d $(DESTDIR)$(SBINDIR)
|
2004-07-03 01:47:15 +08:00
|
|
|
install -m 0755 -d $(DESTDIR)$(CONFDIR)
|
2004-04-16 04:56:59 +08:00
|
|
|
install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
|
|
|
|
install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
|
2004-07-03 01:47:15 +08:00
|
|
|
install -m 0644 README.iproute2+tc $(shell find examples -type f -maxdepth 1) \
|
|
|
|
$(DESTDIR)$(DOCDIR)/examples
|
|
|
|
install -m 0644 $(shell find examples/diffserv -type f -maxdepth 1) \
|
|
|
|
$(DESTDIR)$(DOCDIR)/examples/diffserv
|
2004-04-16 04:56:59 +08:00
|
|
|
@for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
|
2004-07-03 01:47:15 +08:00
|
|
|
install -m 0644 $(shell find etc/iproute2 -type f -maxdepth 1) $(DESTDIR)$(CONFDIR)
|
2004-08-31 06:37:50 +08:00
|
|
|
install -m 0644 $(shell find man/man8 -type f -maxdepth 1) $(DESTDIR)$(MANDIR)/man8
|
|
|
|
ln -sf $(DESTDIR)$(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-bfifo.8
|
|
|
|
ln -sf $(DESTDIR)$(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
|
2004-07-03 01:47:15 +08:00
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
|
|
|
|
clean:
|
2004-06-26 05:14:22 +08:00
|
|
|
@for i in $(SUBDIRS) doc; \
|
|
|
|
do $(MAKE) $(MFLAGS) -C $$i clean; done
|
|
|
|
|
|
|
|
clobber: clean
|
|
|
|
rm -f Config
|
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
|
|
|
|
.EXPORT_ALL_VARIABLES:
|