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.
 
 
 

40 lines
784 B

  1. # Toplevel Makefile
  2. WITH_RRD=yes
  3. PLUGINS := ctstat load memory mount netdev random rtstat stat uptime vmstat
  4. PLUGINS += apache mysql
  5. # ############################
  6. SAMMLER_SRC := sammler.c configfile.c event.c helper.c logging.c network.c plugins.c probe.c
  7. CFLAGS := -O2 -Wall -fno-stack-protector -Iinclude
  8. LDFLAGS := -ldl -rdynamic
  9. # ############################
  10. ifeq ("$(WITH_RRD)", "yes")
  11. SAMMLER_SRC += rrdtool.c
  12. CFLAGS += -DWITH_RRD
  13. LDFLAGS += -lrrd
  14. endif
  15. # ############################
  16. all: sammler
  17. make -C plugins PLUGINS="$(PLUGINS)"
  18. sammler: $(SAMMLER_SRC:%.c=%.o)
  19. $(CC) $(LDFLAGS) $^ -o $@
  20. %.d: %.c
  21. $(CC) $(CFLAGS) -MM -c $< -o $@
  22. %.o: %.c
  23. $(CC) $(CFLAGS) -o $@ -c $<
  24. clean:
  25. rm -rf *.d *.o sammler
  26. make -C plugins clean
  27. -include $(SAMMLER_SRC:%.c=%.d)