1 IPOBJ
=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
2 rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
3 ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o iptoken.o \
4 ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
5 iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
6 iplink_macvlan.o iplink_macvtap.o ipl2tp.o link_vti.o link_vti6.o \
7 iplink_vxlan.o tcp_metrics.o iplink_ipoib.o ipnetconf.o link_ip6tnl.o \
8 link_iptnl.o link_gre6.o iplink_bond.o iplink_bond_slave.o iplink_hsr.o \
9 iplink_bridge.o iplink_bridge_slave.o ipfou.o iplink_ipvlan.o \
16 ifeq ($(IP_CONFIG_SETNS
),y
)
17 CFLAGS
+= -DHAVE_SETNS
20 ALLOBJ
=$(IPOBJ
) $(RTMONOBJ
)
21 SCRIPTS
=ifcfg rtpr routel routef
24 all: $(TARGETS
) $(SCRIPTS
)
26 ip
: $(IPOBJ
) $(LIBNETLINK
)
31 install -m
0755 $(TARGETS
) $(DESTDIR
)$(SBINDIR
)
32 install -m
0755 $(SCRIPTS
) $(DESTDIR
)$(SBINDIR
)
35 rm -f
$(ALLOBJ
) $(TARGETS
)
38 ifeq ($(SHARED_LIBS
),y
)
41 LDFLAGS
+= -Wl
,-export-dynamic
46 static-syms.o
: static-syms.h
47 static-syms.h
: $(wildcard *.c
)
49 for s in
`grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
50 sed
-n
'/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \