]> git.proxmox.com Git - mirror_iproute2.git/blame - ip/Makefile
Update headers to 3.10
[mirror_iproute2.git] / ip / Makefile
CommitLineData
0dc34c77 1IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
288384f2 2 rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
580fbd88 3 ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o \
e32d4db0 4 ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
d63a9b2b 5 iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
a5494df2 6 iplink_macvlan.o iplink_macvtap.o ipl2tp.o link_vti.o \
1ce2de97
ND
7 iplink_vxlan.o tcp_metrics.o iplink_ipoib.o ipnetconf.o link_ip6tnl.o \
8 link_iptnl.o
5c302d51 9
aba5acdf
SH
10RTMONOBJ=rtmon.o
11
2e8a07f5
EB
12include ../Config
13
14ifeq ($(IP_CONFIG_SETNS),y)
15 CFLAGS += -DHAVE_SETNS
16endif
17
aba5acdf 18ALLOBJ=$(IPOBJ) $(RTMONOBJ)
03ffadfe
SH
19SCRIPTS=ifcfg rtpr routel routef
20TARGETS=ip rtmon
aba5acdf 21
8ced4fcd 22all: $(TARGETS) $(SCRIPTS)
aba5acdf 23
8ced4fcd 24ip: $(IPOBJ) $(LIBNETLINK)
aba5acdf 25
8ced4fcd
YY
26
27rtmon: $(RTMONOBJ)
aba5acdf
SH
28
29install: all
418a217a 30 install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
03ffadfe 31 install -m 0755 $(SCRIPTS) $(DESTDIR)$(SBINDIR)
aba5acdf
SH
32
33clean:
34 rm -f $(ALLOBJ) $(TARGETS)
35
f2e27cfb
MF
36SHARED_LIBS ?= y
37ifeq ($(SHARED_LIBS),y)
d84914a0 38
f2e27cfb 39LDLIBS += -ldl
d84914a0 40LDFLAGS += -Wl,-export-dynamic
f2e27cfb
MF
41
42else
43
44ip: static-syms.o
45static-syms.o: static-syms.h
46static-syms.h: $(wildcard *.c)
47 files="$^" ; \
48 for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
49 sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
50 done > $@
51
52endif