2004-04-16 04:56:59 +08:00
|
|
|
IPOBJ=ip.o ipaddress.o iproute.o iprule.o \
|
2006-11-24 11:27:09 +08:00
|
|
|
rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
|
2005-01-18 07:30:18 +08:00
|
|
|
ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o \
|
2007-09-05 18:51:10 +08:00
|
|
|
ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o
|
2004-04-16 04:56:59 +08:00
|
|
|
|
2007-09-02 00:47:19 +08:00
|
|
|
IPOBJ += iplink_vlan.o
|
|
|
|
|
2004-04-16 04:56:59 +08:00
|
|
|
RTMONOBJ=rtmon.o
|
|
|
|
|
|
|
|
ALLOBJ=$(IPOBJ) $(RTMONOBJ)
|
2005-02-10 06:05:41 +08:00
|
|
|
SCRIPTS=ifcfg rtpr routel routef
|
|
|
|
TARGETS=ip rtmon
|
2007-07-11 17:33:55 +08:00
|
|
|
LIBS=link_veth.so
|
2004-04-16 04:56:59 +08:00
|
|
|
|
2007-07-11 17:33:55 +08:00
|
|
|
all: $(TARGETS) $(SCRIPTS) $(LIBS)
|
2004-04-16 04:56:59 +08:00
|
|
|
|
|
|
|
ip: $(IPOBJ) $(LIBNETLINK) $(LIBUTIL)
|
|
|
|
|
|
|
|
rtmon: $(RTMONOBJ) $(LIBNETLINK)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
install -m 0755 -s $(TARGETS) $(DESTDIR)$(SBINDIR)
|
2005-02-10 06:05:41 +08:00
|
|
|
install -m 0755 $(SCRIPTS) $(DESTDIR)$(SBINDIR)
|
2004-04-16 04:56:59 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(ALLOBJ) $(TARGETS)
|
|
|
|
|
2007-08-23 01:49:01 +08:00
|
|
|
LDLIBS += -ldl
|
|
|
|
LDFLAGS += -Wl,-export-dynamic
|
2007-07-11 17:33:55 +08:00
|
|
|
|
|
|
|
%.so: %.c
|
|
|
|
$(CC) $(CFLAGS) -shared $< -o $@
|