1 SSOBJ=ss.o ssfilter.o 2 LNSTATOBJ=lnstat.o lnstat_util.o 3 4 TARGETS=ss nstat ifstat rtacct arpd lnstat 5 6 include ../Config 7 8 all: $(TARGETS) 9 10 ss: $(SSOBJ) 11 12 nstat: nstat.c 13 $(CC) $(CFLAGS) $(LDFLAGS) -o nstat nstat.c -lm 14 15 ifstat: ifstat.c 16 $(CC) $(CFLAGS) $(LDFLAGS) -o ifstat ifstat.c $(LIBNETLINK) -lm 17 18 rtacct: rtacct.c 19 $(CC) $(CFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LIBNETLINK) -lm 20 21 arpd: arpd.c 22 $(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd arpd.c $(LIBNETLINK) -ldb -lpthread 23 24 ssfilter.c: ssfilter.y 25 bison ssfilter.y -o ssfilter.c 26 27 lnstat: $(LNSTATOBJ) 28 29 install: all 30 install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR) 31 ln -sf lnstat $(DESTDIR)$(SBINDIR)/rtstat 32 ln -sf lnstat $(DESTDIR)$(SBINDIR)/ctstat 33 34 clean: 35 rm -f *.o $(TARGETS) ssfilter.c 36