2006-06-13 21:34:36 +02:00
|
|
|
# Toplevel Makefile
|
|
|
|
|
2006-08-03 19:49:07 +02:00
|
|
|
SAMMLER_SRC := sammler.c configfile.c logging.c network.c rrdtool.c plugins.c
|
2006-06-13 21:34:36 +02:00
|
|
|
PLUGIN_SRC := $(wildcard p_*.c)
|
|
|
|
CFLAGS := -O2 -Wall
|
|
|
|
LDFLAGS := -ldl -lrrd -rdynamic
|
|
|
|
|
|
|
|
# ############################
|
|
|
|
|
|
|
|
all: sammler $(PLUGIN_SRC:%.c=%.so)
|
|
|
|
|
|
|
|
sammler: $(SAMMLER_SRC:%.c=%.o)
|
|
|
|
$(CC) $(LDFLAGS) $^ -o $@
|
|
|
|
|
|
|
|
%.d: %.c
|
|
|
|
$(CC) $(CFLAGS) -MM -c $< -o $@
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
%_sh.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -fPIC -o $@ -c $<
|
|
|
|
|
|
|
|
%.so: %_sh.o
|
|
|
|
$(LD) -shared -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf *.d *.o *.so sammler
|
|
|
|
|
|
|
|
#-include $(SAMMLER_SRC:.c=.d) $(PLUGIN_SRC:.c=.d)
|