mirror_iproute2/misc/Makefile
Yegor Yefremov 8ced4fcd50 iproute2: cleanup dependencies
LIBNETLINK will be defined in the main Makefile, so
both ../lib/libnetlink.a ../lib/libutil.a will be
automatically appended during linking. Otherwise
../lib/libnetlink.a ../lib/libutil.a will appear
twice during linking.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2012-02-27 08:27:54 -08:00

36 lines
751 B
Makefile

SSOBJ=ss.o ssfilter.o
LNSTATOBJ=lnstat.o lnstat_util.o
TARGETS=ss nstat ifstat rtacct arpd lnstat
include ../Config
all: $(TARGETS)
ss: $(SSOBJ)
nstat: nstat.c
$(CC) $(CFLAGS) $(LDFLAGS) -o nstat nstat.c -lm
ifstat: ifstat.c
$(CC) $(CFLAGS) $(LDFLAGS) -o ifstat ifstat.c $(LIBNETLINK) -lm
rtacct: rtacct.c
$(CC) $(CFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LIBNETLINK) -lm
arpd: arpd.c
$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd arpd.c $(LIBNETLINK) -ldb -lpthread
ssfilter.c: ssfilter.y
bison ssfilter.y -o ssfilter.c
lnstat: $(LNSTATOBJ)
install: all
install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
ln -sf lnstat $(DESTDIR)$(SBINDIR)/rtstat
ln -sf lnstat $(DESTDIR)$(SBINDIR)/ctstat
clean:
rm -f *.o $(TARGETS) ssfilter.c