1SSOBJ=ss.o ssfilter.o 2LNSTATOBJ=lnstat.o lnstat_util.o 3 4TARGETS=ss nstat ifstat rtacct lnstat 5 6include ../config.mk 7 8ifeq ($(HAVE_BERKELEY_DB),y) 9 TARGETS += arpd 10endif 11 12all: $(TARGETS) 13 14ss: $(SSOBJ) 15 $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@ 16 17nstat: nstat.c 18 $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o nstat nstat.c $(LDLIBS) -lm 19 20ifstat: ifstat.c 21 $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o ifstat ifstat.c $(LDLIBS) -lm 22 23rtacct: rtacct.c 24 $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LDLIBS) -lm 25 26arpd: arpd.c 27 $(QUIET_CC)$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd arpd.c $(LDLIBS) -ldb -lpthread 28 29ssfilter.c: ssfilter.y 30 $(QUIET_YACC)bison ssfilter.y -o ssfilter.c 31 32lnstat: $(LNSTATOBJ) 33 $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@ 34 35install: all 36 install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR) 37 ln -sf lnstat $(DESTDIR)$(SBINDIR)/rtstat 38 ln -sf lnstat $(DESTDIR)$(SBINDIR)/ctstat 39 40clean: 41 rm -f *.o $(TARGETS) ssfilter.c 42