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