blob: a181ffc9c0756f0354b6db3eb43a78818f7cd441 [file] [log] [blame]
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +00001DESTDIR=
osdl.org!shemmingerc90d5872004-06-09 21:28:11 +00002SBINDIR=/usr/sbin
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +00003CONFDIR=/etc/iproute2
osdl.net!shemminger562fac22004-09-28 19:59:54 +00004DOCDIR=/usr/share/doc/iproute2
osdl.net!shemminger06ddd502004-08-30 22:37:50 +00005MANDIR=/usr/share/man
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +00006
osdl.net!shemmingerd1e48c72004-06-25 21:20:20 +00007# Path to db_185.h include
8DBM_INCLUDE:=/usr/include
9
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000010DEFINES= -DRESOLVE_HOSTNAMES
11
12#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
13LDLIBS=-lresolv
14ADDLIB=
15
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000016#options for decnet
17ADDLIB+=dnet_ntop.o dnet_pton.o
18
19#options for ipx
20ADDLIB+=ipx_ntop.o ipx_pton.o
21
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000022CC = gcc
23CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
osdl.net!shemminger71c60c02004-08-04 17:45:52 +000024CFLAGS = $(CCOPTS) -I../include $(DEFINES)
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000025
26LDLIBS += -L../lib -lnetlink -lutil
27
28SUBDIRS=lib ip tc misc
29
30LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
31
osdl.net!shemmingeradff36d2004-06-25 21:14:22 +000032all: Config
33 @for i in $(SUBDIRS); \
34 do $(MAKE) $(MFLAGS) -C $$i; done
35
36Config:
37 ./configure $(KERNEL_INCLUDE)
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000038
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000039install: all
40 install -m 0755 -d $(DESTDIR)$(SBINDIR)
osdl.net!shemmingere9a05e92004-07-02 17:47:15 +000041 install -m 0755 -d $(DESTDIR)$(CONFDIR)
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000042 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
43 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
osdl.net!shemmingerc72238e2004-12-07 23:57:50 +000044 install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
osdl.net!shemmingere9a05e92004-07-02 17:47:15 +000045 $(DESTDIR)$(DOCDIR)/examples
osdl.net!shemmingerc72238e2004-12-07 23:57:50 +000046 install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
osdl.net!shemmingere9a05e92004-07-02 17:47:15 +000047 $(DESTDIR)$(DOCDIR)/examples/diffserv
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000048 @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
osdl.net!shemmingerc72238e2004-12-07 23:57:50 +000049 install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
osdl.net!shemmingercb4d97a2004-09-28 19:16:48 +000050 install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
osdl.net!shemmingerc72238e2004-12-07 23:57:50 +000051 install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
osdl.net!shemmingerc3759b72004-09-28 18:52:54 +000052 ln -sf $(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-bfifo.8
53 ln -sf $(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
net[shemminger]!shemminger85ac60c2005-01-17 23:27:37 +000054 install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000055
56clean:
osdl.net!shemmingeradff36d2004-06-25 21:14:22 +000057 @for i in $(SUBDIRS) doc; \
58 do $(MAKE) $(MFLAGS) -C $$i clean; done
59
60clobber: clean
61 rm -f Config
62
net[shemminger]!shemminger44d3eb22004-10-07 18:55:51 +000063distclean: clean clobber
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000064
65.EXPORT_ALL_VARIABLES: