rrd based system stats
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
793 B

# Toplevel Makefile
WITH_RRD=yes
PLUGINS := ctstat diskstat load memory mount netdev random rtstat stat uptime vmstat
PLUGINS += apache mysql
# ############################
SAMMLER_SRC := sammler.c configfile.c event.c helper.c logging.c network.c plugins.c probe.c
CFLAGS := -O2 -Wall -fno-stack-protector -Iinclude
LDFLAGS := -ldl -rdynamic
# ############################
ifeq ("$(WITH_RRD)", "yes")
SAMMLER_SRC += rrdtool.c
CFLAGS += -DWITH_RRD
LDFLAGS += -lrrd
endif
# ############################
all: sammler
make -C plugins PLUGINS="$(PLUGINS)"
sammler: $(SAMMLER_SRC:%.c=%.o)
$(CC) $(LDFLAGS) $^ -o $@
%.d: %.c
$(CC) $(CFLAGS) -MM -c $< -o $@
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
clean:
rm -rf *.d *.o sammler
make -C plugins clean
-include $(SAMMLER_SRC:%.c=%.d)