4 DOCDIR=/usr/doc/iproute2
6 # Path to parent kernel include files directory
7 KERNEL_INCLUDE:=/usr/include
9 # Path to db_185.h include
10 DBM_INCLUDE:=/usr/include
12 DEFINES= -DRESOLVE_HOSTNAMES
14 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
19 ADDLIB+=dnet_ntop.o dnet_pton.o
22 ADDLIB+=ipx_ntop.o ipx_pton.o
25 CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
26 CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
28 LDLIBS += -L../lib -lnetlink -lutil
30 SUBDIRS=lib ip tc misc
32 LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
35 @for i in $(SUBDIRS); \
36 do $(MAKE) $(MFLAGS) -C $$i; done
39 ./configure $(KERNEL_INCLUDE)
42 install -m 0755 -d $(DESTDIR)$(SBINDIR)
43 install -m 0755 -d $(CONFDIR)
44 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
45 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
46 install -m 0644 README.iproute2+tc $(shell find examples -type f -maxdepth 1) $(DESTDIR)$(DOCDIR)/examples
47 install -m 0644 $(shell echo examples/diffserv/*) $(DESTDIR)$(DOCDIR)/examples/diffserv
48 @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
49 @cd etc/iproute2; for i in *; do \
50 if [ ! -e $(CONFDIR)/$$i ]; then \
51 echo install -m 0644 $$i $(CONFDIR); \
52 install -m 0644 $$i $(CONFDIR); fi; done
55 @for i in $(SUBDIRS) doc; \
56 do $(MAKE) $(MFLAGS) -C $$i clean; done
62 .EXPORT_ALL_VARIABLES: