sammler/Makefile

40 lines
803 B
Makefile
Raw Normal View History

2006-06-13 21:34:36 +02:00
# Toplevel Makefile
2007-04-01 14:56:14 +02:00
WITH_RRD=yes
2006-06-13 21:34:36 +02:00
2007-04-03 17:12:53 +02:00
PLUGINS := ctstat diskstat load memory mount netdev random rtstat stat uptime vmstat
2007-04-03 18:49:39 +02:00
PLUGINS += apache mysql conntrack
2006-10-08 18:05:47 +02:00
2006-09-30 22:55:04 +02:00
# ############################
2007-04-01 14:30:05 +02:00
SAMMLER_SRC := sammler.c configfile.c event.c helper.c logging.c network.c plugins.c probe.c
2007-04-01 14:56:14 +02:00
CFLAGS := -O2 -Wall -fno-stack-protector -Iinclude
2006-09-30 22:55:04 +02:00
LDFLAGS := -ldl -rdynamic
# ############################
ifeq ("$(WITH_RRD)", "yes")
2006-10-08 01:58:01 +02:00
SAMMLER_SRC += rrdtool.c
CFLAGS += -DWITH_RRD
LDFLAGS += -lrrd
endif
2006-06-13 21:34:36 +02:00
# ############################
2007-04-01 14:56:14 +02:00
all: sammler
make -C plugins PLUGINS="$(PLUGINS)"
2006-06-13 21:34:36 +02:00
sammler: $(SAMMLER_SRC:%.c=%.o)
$(CC) $(LDFLAGS) $^ -o $@
%.d: %.c
$(CC) $(CFLAGS) -MM -c $< -o $@
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
clean:
2007-04-01 14:56:14 +02:00
rm -rf *.d *.o sammler
make -C plugins clean
2006-06-13 21:34:36 +02:00
2007-04-01 14:56:14 +02:00
-include $(SAMMLER_SRC:%.c=%.d)