]>
Commit | Line | Data |
---|---|---|
aba5acdf | 1 | DESTDIR= |
c90d5875 | 2 | SBINDIR=/usr/sbin |
aba5acdf | 3 | CONFDIR=/etc/iproute2 |
562fac2a | 4 | DOCDIR=/usr/share/doc/iproute2 |
06ddd50f | 5 | MANDIR=/usr/share/man |
aba5acdf | 6 | |
d1e48c7e SH |
7 | # Path to db_185.h include |
8 | DBM_INCLUDE:=/usr/include | |
9 | ||
aba5acdf SH |
10 | DEFINES= -DRESOLVE_HOSTNAMES |
11 | ||
12 | #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc) | |
13 | LDLIBS=-lresolv | |
14 | ADDLIB= | |
15 | ||
aba5acdf SH |
16 | #options for decnet |
17 | ADDLIB+=dnet_ntop.o dnet_pton.o | |
18 | ||
19 | #options for ipx | |
20 | ADDLIB+=ipx_ntop.o ipx_pton.o | |
21 | ||
aba5acdf | 22 | CC = gcc |
b209eda9 | 23 | HOSTCC = gcc |
c450ff3d | 24 | CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall |
71c60c07 | 25 | CFLAGS = $(CCOPTS) -I../include $(DEFINES) |
9ddbb02e | 26 | YACCFLAGS = -d -t -v |
aba5acdf SH |
27 | |
28 | LDLIBS += -L../lib -lnetlink -lutil | |
29 | ||
65018ae4 | 30 | SUBDIRS=lib ip tc misc netem genl |
aba5acdf SH |
31 | |
32 | LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a | |
33 | ||
737f15f6 | 34 | all: Config |
95dd5950 MF |
35 | @set -e; \ |
36 | for i in $(SUBDIRS); \ | |
adff36d7 SH |
37 | do $(MAKE) $(MFLAGS) -C $$i; done |
38 | ||
39 | Config: | |
f35e9289 | 40 | sh configure $(KERNEL_INCLUDE) |
aba5acdf | 41 | |
aba5acdf SH |
42 | install: all |
43 | install -m 0755 -d $(DESTDIR)$(SBINDIR) | |
e9a05e96 | 44 | install -m 0755 -d $(DESTDIR)$(CONFDIR) |
aba5acdf SH |
45 | install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples |
46 | install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv | |
c72238e4 | 47 | install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \ |
e9a05e96 | 48 | $(DESTDIR)$(DOCDIR)/examples |
c72238e4 | 49 | install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \ |
e9a05e96 | 50 | $(DESTDIR)$(DOCDIR)/examples/diffserv |
aba5acdf | 51 | @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done |
c72238e4 | 52 | install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR) |
cb4d97a9 | 53 | install -m 0755 -d $(DESTDIR)$(MANDIR)/man8 |
c72238e4 | 54 | install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8 |
705899a0 | 55 | ln -sf tc-bfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8 |
f7c3cefc AH |
56 | ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/rtstat.8 |
57 | ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/ctstat.8 | |
58 | ln -sf rtacct.8 $(DESTDIR)$(MANDIR)/man8/nstat.8 | |
c450ff3d | 59 | install -m 0755 -d $(DESTDIR)$(MANDIR)/man3 |
85ac60ce | 60 | install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3 |
aba5acdf | 61 | |
235ac6a4 SH |
62 | snapshot: |
63 | echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \ | |
64 | > include/SNAPSHOT.h | |
65 | ||
aba5acdf | 66 | clean: |
f6aa8e00 | 67 | rm -f cscope.* |
adff36d7 SH |
68 | @for i in $(SUBDIRS) doc; \ |
69 | do $(MAKE) $(MFLAGS) -C $$i clean; done | |
70 | ||
71 | clobber: clean | |
72 | rm -f Config | |
73 | ||
87773db5 | 74 | distclean: clobber |
aba5acdf | 75 | |
f6aa8e00 SH |
76 | cscope: |
77 | cscope -b -q -R -Iinclude -sip -slib -smisc -snetem -stc | |
78 | ||
aba5acdf | 79 | .EXPORT_ALL_VARIABLES: |