Commit 11d1cad8 authored by osdl.net!shemminger's avatar osdl.net!shemminger

simplify make file.

(Logical change 1.34)
parent d1e48c7e
SSOBJ=ss.o ssfilter.o
NSTATOBJ=nstat.o
IFSTATOBJ=ifstat.o
RTACCTOBJ=rtacct.o
ARPDOBJ=arpd.o
RTSTATOBJ=rtstat.o
ALLOBJ=$(SSOBJ) $(NSTATOBJ) $(IFSTATOBJ) $(RTACCTOBJ) $(ARPDOBJ) $(RTSTATOBJ)
TARGETS=ss nstat ifstat rtacct arpd rtstat
include ../Config
......@@ -17,26 +11,24 @@ ifeq ($(SS_CONFIG_DRS),y)
DEFINES += -DHAVE_TCP_DRS
endif
all: $(TARGETS)
ss: $(SSOBJ) $(LIBUTIL)
nstat: $(NSTATOBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o nstat $(NSTATOBJ) -lm
nstat: nstat.c
$(CC) $(CFLAGS) $(LDFLAGS) -o nstat nstat.c -lm
ifstat: $(IFSTATOBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o ifstat $(IFSTATOBJ) $(LIBNETLINK) -lm
ifstat: ifstat.c
$(CC) $(CFLAGS) $(LDFLAGS) -o ifstat ifstat.c $(LIBNETLINK) -lm
rtacct: $(RTACCTOBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o rtacct $(RTACCTOBJ) $(LIBNETLINK) -lm
rtacct: rtacct.c
$(CC) $(CFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LIBNETLINK) -lm
arpd: $(ARPDOBJ)
$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd $(ARPDOBJ) $(LIBNETLINK) -ldb
arpd: arpd.c
$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd arpd.c $(LIBNETLINK) -ldb
rtstat: $(RTSTATOBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o rtstat $(RTSTATOBJ)
rtstat: rtstat.c
$(CC) $(CFLAGS) $(LDFLAGS) -o rtstat rtstat.c
ssfilter.c: ssfilter.y
bison ssfilter.y -o ssfilter.c
......@@ -45,4 +37,4 @@ install: all
install -m 0755 -s $(TARGETS) $(DESTDIR)$(SBINDIR)
clean:
rm -f $(ALLOBJ) $(TARGETS) ssfilter.c
rm -f *.o $(TARGETS) ssfilter.c
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment