]> git.proxmox.com Git - mirror_iproute2.git/blame - Makefile
Import patch iproute2.114
[mirror_iproute2.git] / Makefile
CommitLineData
aba5acdf 1DESTDIR=
c90d5875 2SBINDIR=/usr/sbin
aba5acdf 3CONFDIR=/etc/iproute2
562fac2a 4DOCDIR=/usr/share/doc/iproute2
06ddd50f 5MANDIR=/usr/share/man
aba5acdf 6
d1e48c7e
SH
7# Path to db_185.h include
8DBM_INCLUDE:=/usr/include
9
aba5acdf
SH
10DEFINES= -DRESOLVE_HOSTNAMES
11
12#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
13LDLIBS=-lresolv
14ADDLIB=
15
aba5acdf
SH
16#options for decnet
17ADDLIB+=dnet_ntop.o dnet_pton.o
18
19#options for ipx
20ADDLIB+=ipx_ntop.o ipx_pton.o
21
aba5acdf
SH
22CC = gcc
23CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
71c60c07 24CFLAGS = $(CCOPTS) -I../include $(DEFINES)
aba5acdf
SH
25
26LDLIBS += -L../lib -lnetlink -lutil
27
28SUBDIRS=lib ip tc misc
29
30LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
31
adff36d7
SH
32all: Config
33 @for i in $(SUBDIRS); \
34 do $(MAKE) $(MFLAGS) -C $$i; done
35
36Config:
37 ./configure $(KERNEL_INCLUDE)
aba5acdf 38
aba5acdf
SH
39install: 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
c72238e4 44 install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
e9a05e96 45 $(DESTDIR)$(DOCDIR)/examples
c72238e4 46 install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
e9a05e96 47 $(DESTDIR)$(DOCDIR)/examples/diffserv
aba5acdf 48 @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
c72238e4 49 install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
cb4d97a9 50 install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
c72238e4 51 install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
c3759b76
SH
52 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
85ac60ce 54 install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3
aba5acdf
SH
55
56clean:
adff36d7
SH
57 @for i in $(SUBDIRS) doc; \
58 do $(MAKE) $(MFLAGS) -C $$i clean; done
59
60clobber: clean
61 rm -f Config
62
44d3eb25 63distclean: clean clobber
aba5acdf
SH
64
65.EXPORT_ALL_VARIABLES: