]> git.proxmox.com Git - mirror_iproute2.git/blame - Makefile
iproute2 - Split up manual page installation
[mirror_iproute2.git] / Makefile
CommitLineData
b514b358 1DESTDIR=/usr/
ed1af7e8 2ROOTDIR=$(DESTDIR)
5e3bb534 3LIBDIR=/usr/lib/
b514b358 4SBINDIR=/sbin
aba5acdf 5CONFDIR=/etc/iproute2
b514b358
RA
6DOCDIR=/share/doc/iproute2
7MANDIR=/share/man
e48f73d6 8ARPDDIR=/var/lib/arpd
aba5acdf 9
d1e48c7e 10# Path to db_185.h include
ed1af7e8 11DBM_INCLUDE:=$(ROOTDIR)/usr/include
d1e48c7e 12
f2e27cfb
MF
13SHARED_LIBS = y
14
5e3bb534 15DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
f2e27cfb
MF
16ifneq ($(SHARED_LIBS),y)
17DEFINES+= -DNO_SHARED_LIBS
18endif
aba5acdf
SH
19
20#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
21LDLIBS=-lresolv
22ADDLIB=
23
aba5acdf
SH
24#options for decnet
25ADDLIB+=dnet_ntop.o dnet_pton.o
26
27#options for ipx
28ADDLIB+=ipx_ntop.o ipx_pton.o
29
aba5acdf 30CC = gcc
b209eda9 31HOSTCC = gcc
c8610020
CT
32DEFINES += -D_GNU_SOURCE
33CCOPTS = -O2
34WFLAGS = -Wall -Wstrict-prototypes
35CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
9ddbb02e 36YACCFLAGS = -d -t -v
aba5acdf 37
761a1e60 38SUBDIRS=lib ip tc misc netem genl man
aba5acdf
SH
39
40LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
2230ac1d 41LDLIBS += $(LIBNETLINK)
aba5acdf 42
737f15f6 43all: Config
95dd5950
MF
44 @set -e; \
45 for i in $(SUBDIRS); \
adff36d7
SH
46 do $(MAKE) $(MFLAGS) -C $$i; done
47
48Config:
f35e9289 49 sh configure $(KERNEL_INCLUDE)
aba5acdf 50
aba5acdf
SH
51install: all
52 install -m 0755 -d $(DESTDIR)$(SBINDIR)
e9a05e96 53 install -m 0755 -d $(DESTDIR)$(CONFDIR)
e48f73d6 54 install -m 0755 -d $(DESTDIR)$(ARPDDIR)
aba5acdf
SH
55 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
56 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
c72238e4 57 install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
e9a05e96 58 $(DESTDIR)$(DOCDIR)/examples
c72238e4 59 install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
e9a05e96 60 $(DESTDIR)$(DOCDIR)/examples/diffserv
aba5acdf 61 @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
c72238e4 62 install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
aba5acdf 63
235ac6a4
SH
64snapshot:
65 echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \
66 > include/SNAPSHOT.h
67
aba5acdf 68clean:
adff36d7
SH
69 @for i in $(SUBDIRS) doc; \
70 do $(MAKE) $(MFLAGS) -C $$i clean; done
71
82408fc1
SH
72clobber:
73 touch Config
74 $(MAKE) $(MFLAGS) clean
a6ddc206 75 rm -f Config cscope.*
adff36d7 76
87773db5 77distclean: clobber
aba5acdf 78
f6aa8e00
SH
79cscope:
80 cscope -b -q -R -Iinclude -sip -slib -smisc -snetem -stc
81
aba5acdf 82.EXPORT_ALL_VARIABLES: