Tomato 1.26 beta (1786)
[tomato.git] / release / src / router / rstats / Makefile
blob6aabec28e4745403aeb6bc0db6adf4fcca0c27a5
1 include ../common.mak
3 CFLAGS = -O2 -Wall #-mips32
4 CFLAGS += -I$(SRCBASE)/include -I$(TOP)/shared
5 LDFLAGS =
7 OBJS = rstats.o
9 all: rstats
11 rstats: $(OBJS)
12 @echo " [rstats] CC -o $@"
13 @$(CC) $(LDFLAGS) -o $@ $(OBJS) -L../nvram -lnvram -L../shared -lshared
15 $(SIZECHECK)
16 $(CPTMP)
18 clean:
19 rm -f rstats .*.depend
20 rm -f *.o
22 install: all
23 @echo " [rstats] Installing..."
24 install -D -m 0500 rstats $(INSTALLDIR)/bin/rstats
25 $(STRIP) $(INSTALLDIR)/bin/rstats
27 %.o: %.c .%.depend
28 @echo " [rstats] CC $@"
29 @$(CC) $(CFLAGS) -c $<
31 .depend: $(OBJS:%.o=%.c)
32 @$(CC) $(CFLAGS) -M $^ > .depend
34 .%.depend: %.c
35 @$(CC) $(CFLAGS) -M $< > $@
37 -include $(OBJS:%.o=.%.depend)