]> git.proxmox.com Git - mirror_iproute2.git/blame - Makefile
change of rtnetlink to use RTN_F_OFFLOAD
[mirror_iproute2.git] / Makefile
CommitLineData
06ec9039
1PREFIX?=/usr
2LIBDIR?=$(PREFIX)/lib
3SBINDIR?=/sbin
4CONFDIR?=/etc/iproute2
5DATADIR?=$(PREFIX)/share
6DOCDIR?=$(DATADIR)/doc/iproute2
7MANDIR?=$(DATADIR)/man
8ARPDDIR?=/var/lib/arpd
9KERNEL_INCLUDE?=/usr/include
aba5acdf 10
d1e48c7e 11# Path to db_185.h include
06ec9039 12DBM_INCLUDE:=$(DESTDIR)/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
dacc5d41
EB
29#options for mpls
30ADDLIB+=mpls_ntop.o mpls_pton.o
31
aba5acdf 32CC = gcc
b209eda9 33HOSTCC = gcc
c8610020
CT
34DEFINES += -D_GNU_SOURCE
35CCOPTS = -O2
3140e9a3 36WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
4ec0ffde 37WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
6398d3a6 38
06ec9039 39CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS)
9ddbb02e 40YACCFLAGS = -d -t -v
aba5acdf 41
f043759d 42SUBDIRS=lib ip tc bridge misc netem genl tipc man
aba5acdf
SH
43
44LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
2230ac1d 45LDLIBS += $(LIBNETLINK)
aba5acdf 46
737f15f6 47all: Config
95dd5950
MF
48 @set -e; \
49 for i in $(SUBDIRS); \
adff36d7
SH
50 do $(MAKE) $(MFLAGS) -C $$i; done
51
52Config:
f35e9289 53 sh configure $(KERNEL_INCLUDE)
aba5acdf 54
aba5acdf
SH
55install: all
56 install -m 0755 -d $(DESTDIR)$(SBINDIR)
e9a05e96 57 install -m 0755 -d $(DESTDIR)$(CONFDIR)
e48f73d6 58 install -m 0755 -d $(DESTDIR)$(ARPDDIR)
aba5acdf
SH
59 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
60 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
c72238e4 61 install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
e9a05e96 62 $(DESTDIR)$(DOCDIR)/examples
c72238e4 63 install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
e9a05e96 64 $(DESTDIR)$(DOCDIR)/examples/diffserv
aba5acdf 65 @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
c72238e4 66 install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
aba5acdf 67
235ac6a4
SH
68snapshot:
69 echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \
70 > include/SNAPSHOT.h
71
aba5acdf 72clean:
adff36d7
SH
73 @for i in $(SUBDIRS) doc; \
74 do $(MAKE) $(MFLAGS) -C $$i clean; done
75
82408fc1
SH
76clobber:
77 touch Config
78 $(MAKE) $(MFLAGS) clean
a6ddc206 79 rm -f Config cscope.*
adff36d7 80
87773db5 81distclean: clobber
aba5acdf 82
f6aa8e00
SH
83cscope:
84 cscope -b -q -R -Iinclude -sip -slib -smisc -snetem -stc
85
aba5acdf 86.EXPORT_ALL_VARIABLES: