]>
Commit | Line | Data |
---|---|---|
aba5acdf | 1 | DESTDIR= |
c90d5875 | 2 | SBINDIR=/usr/sbin |
aba5acdf SH |
3 | CONFDIR=/etc/iproute2 |
4 | DOCDIR=/usr/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 SH |
22 | CC = gcc |
23 | CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g | |
71c60c07 | 24 | CFLAGS = $(CCOPTS) -I../include $(DEFINES) |
aba5acdf SH |
25 | |
26 | LDLIBS += -L../lib -lnetlink -lutil | |
27 | ||
28 | SUBDIRS=lib ip tc misc | |
29 | ||
30 | LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a | |
31 | ||
adff36d7 SH |
32 | all: Config |
33 | @for i in $(SUBDIRS); \ | |
34 | do $(MAKE) $(MFLAGS) -C $$i; done | |
35 | ||
36 | Config: | |
37 | ./configure $(KERNEL_INCLUDE) | |
aba5acdf | 38 | |
aba5acdf SH |
39 | install: all |
40 | install -m 0755 -d $(DESTDIR)$(SBINDIR) | |
e9a05e96 | 41 | install -m 0755 -d $(DESTDIR)$(CONFDIR) |
aba5acdf SH |
42 | install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples |
43 | install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv | |
e9a05e96 SH |
44 | install -m 0644 README.iproute2+tc $(shell find examples -type f -maxdepth 1) \ |
45 | $(DESTDIR)$(DOCDIR)/examples | |
46 | install -m 0644 $(shell find examples/diffserv -type f -maxdepth 1) \ | |
47 | $(DESTDIR)$(DOCDIR)/examples/diffserv | |
aba5acdf | 48 | @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done |
e9a05e96 | 49 | install -m 0644 $(shell find etc/iproute2 -type f -maxdepth 1) $(DESTDIR)$(CONFDIR) |
06ddd50f | 50 | install -m 0644 $(shell find man/man8 -type f -maxdepth 1) $(DESTDIR)$(MANDIR)/man8 |
c3759b76 SH |
51 | ln -sf $(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-bfifo.8 |
52 | ln -sf $(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8 | |
aba5acdf SH |
53 | |
54 | clean: | |
adff36d7 SH |
55 | @for i in $(SUBDIRS) doc; \ |
56 | do $(MAKE) $(MFLAGS) -C $$i clean; done | |
57 | ||
58 | clobber: clean | |
59 | rm -f Config | |
60 | ||
aba5acdf SH |
61 | |
62 | .EXPORT_ALL_VARIABLES: |