Add u32 extension to match on ether source/destination
[jleu-iproute2.git] / Makefile
blobce8dd06b1cbe7c06becbd1c58f3ff37b03a5c312
1 DESTDIR=/usr/
2 LIBDIR=/usr/lib/
3 SBINDIR=/sbin
4 CONFDIR=/etc/iproute2
5 DOCDIR=/share/doc/iproute2
6 MANDIR=/share/man
7 ARPDDIR=/var/lib/arpd
9 # Path to db_185.h include
10 DBM_INCLUDE:=/usr/include
12 DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
14 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
15 LDLIBS=-lresolv
16 ADDLIB=
18 #options for decnet
19 ADDLIB+=dnet_ntop.o dnet_pton.o
21 #options for ipx
22 ADDLIB+=ipx_ntop.o ipx_pton.o
24 CC = gcc
25 HOSTCC = gcc
26 CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
27 CFLAGS = $(CCOPTS) -I../include $(DEFINES)
28 YACCFLAGS = -d -t -v
30 LDLIBS += -L../lib -lnetlink -lutil
32 SUBDIRS=lib ip tc misc netem genl
34 LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
36 all: Config
37 @set -e; \
38 for i in $(SUBDIRS); \
39 do $(MAKE) $(MFLAGS) -C $$i; done
41 Config:
42 sh configure $(KERNEL_INCLUDE)
44 install: all
45 install -m 0755 -d $(DESTDIR)$(SBINDIR)
46 install -m 0755 -d $(DESTDIR)$(CONFDIR)
47 install -m 0755 -d $(DESTDIR)$(ARPDDIR)
48 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
49 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
50 install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
51 $(DESTDIR)$(DOCDIR)/examples
52 install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
53 $(DESTDIR)$(DOCDIR)/examples/diffserv
54 @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
55 install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
56 install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
57 install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
58 ln -sf tc-bfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
59 ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/rtstat.8
60 ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/ctstat.8
61 ln -sf rtacct.8 $(DESTDIR)$(MANDIR)/man8/nstat.8
62 ln -sf routel.8 $(DESTDIR)$(MANDIR)/man8/routef.8
63 install -m 0755 -d $(DESTDIR)$(MANDIR)/man3
64 install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3
66 snapshot:
67 echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \
68 > include/SNAPSHOT.h
70 clean:
71 rm -f cscope.*
72 @for i in $(SUBDIRS) doc; \
73 do $(MAKE) $(MFLAGS) -C $$i clean; done
75 clobber: clean
76 rm -f Config
78 distclean: clobber
80 cscope:
81 cscope -b -q -R -Iinclude -sip -slib -smisc -snetem -stc
83 .EXPORT_ALL_VARIABLES: