fix iptraffic
[tomato.git] / release / src-rt-6.x.4708 / router / rstats / Makefile
blob4e75dbf783ca97a210b69cb6a694c1ef518e306a
1 include ../common.mak
3 CFLAGS = -Os -Wall $(EXTRACFLAGS) #-mips32
4 CFLAGS += -I$(SRCBASE)/include -I$(TOP)/shared
5 LDFLAGS =
7 ifeq ($(TCONFIG_BCMARM),y)
8 LIBS += -lgcc_s
9 endif
11 OBJS = rstats.o
13 all: rstats
15 rstats: $(OBJS)
16 @echo " [rstats] CC -o $@"
17 @$(CC) $(LDFLAGS) -o $@ $(OBJS) -L../nvram${BCMEX} -lnvram -L../shared -lshared $(LIBS)
19 $(SIZECHECK)
20 $(CPTMP)
22 clean:
23 rm -f rstats .*.depend
24 rm -f *.o
26 install: all
27 @echo " [rstats] Installing..."
28 install -D rstats $(INSTALLDIR)/bin/rstats
29 $(STRIP) $(INSTALLDIR)/bin/rstats
30 chmod 0500 $(INSTALLDIR)/bin/rstats
32 %.o: %.c .%.depend
33 @echo " [rstats] CC $@"
34 @$(CC) $(CFLAGS) -c $<
36 .depend: $(OBJS:%.o=%.c)
37 @$(CC) $(CFLAGS) -M $^ > .depend
39 .%.depend: %.c
40 @$(CC) $(CFLAGS) -M $< > $@
42 -include $(OBJS:%.o=.%.depend)