# darkstat 3
-# copyright (c) 2001-2009 Emil Mikulic.
+# copyright (c) 2001-2011 Emil Mikulic.
#
# You may use, modify and redistribute this file under the terms of the
# GNU General Public License version 2. (see COPYING.GPL)
SRCS = \
acct.c \
addr.c \
+bsd.c \
cap.c \
conv.c \
darkstat.c \
graph_db.c \
hosts_db.c \
hosts_sort.c \
+html.c \
http.c \
localip.c \
ncache.c \
+now.c \
pidfile.c \
str.c
OBJS = $(SRCS:%.c=%.o)
+STATICHS = \
+stylecss.h \
+graphjs.h
+
all: darkstat
darkstat: $(OBJS)
- @echo Linking $@
- $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
+ $(AM_V_LINK)
+ $(AM_V_at)$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
.c.o:
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+ $(AM_V_CC)
+ $(AM_V_at)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean:
- rm -f darkstat $(OBJS) c-ify graphjs.h stylecss.h
+ rm -f darkstat
+ rm -f $(OBJS)
+ rm -f $(STATICHS)
+ rm -f c-ify
-depend: stylecss.h graphjs.h config.status
+depend: config.status $(STATICHS)
cp Makefile.in Makefile.in.old
sed '/^# Automatically generated dependencies$$/,$$d' \
<Makefile.in.old >Makefile.in
show-dep:
@echo $(CPP) $(CPPFLAGS) -MM $(SRCS)
-# Statics: (FIXME?)
-graphjs.h: static/graph.js c-ify
- ./c-ify graph_js <static/graph.js >$@
+graphjs.h: static/graph.js
+ $(AM_V_CIFY)
+ $(AM_V_at)./c-ify graph_js <static/graph.js >$@
-stylecss.h: static/style.css c-ify
- ./c-ify style_css <static/style.css >$@
+stylecss.h: static/style.css
+ $(AM_V_CIFY)
+ $(AM_V_at)./c-ify style_css <static/style.css >$@
+$(STATICHS): c-ify
c-ify: static/c-ify.c
- $(HOSTCC) $(HOSTCFLAGS) static/c-ify.c -o $@
+ $(AM_V_HOSTCC)
+ $(AM_V_at)$(HOSTCC) $(HOSTCFLAGS) static/c-ify.c -o $@
install: darkstat
$(INSTALL) -d $(DESTDIR)$(sbindir)
$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(INSTALL) -m 444 darkstat.8 $(DESTDIR)$(mandir)/man8
+.PHONY: all install clean depend show-dep
+
+# silent-rules
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_LINK = $(am__v_LINK_$(V))
+am__v_LINK_ = $(am__v_LINK_$(AM_DEFAULT_VERBOSITY))
+am__v_LINK_0 = @echo " LINK " $@;
+AM_V_HOSTCC = $(am__v_HOSTCC_$(V))
+am__v_HOSTCC_ = $(am__v_HOSTCC_$(AM_DEFAULT_VERBOSITY))
+am__v_HOSTCC_0 = @echo " HOSTCC" $@;
+AM_V_CIFY = $(am__v_CIFY_$(V))
+am__v_CIFY_ = $(am__v_CIFY_$(AM_DEFAULT_VERBOSITY))
+am__v_CIFY_0 = @echo " C-IFY " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+
# Automatically generated dependencies
-acct.o: acct.c darkstat.h config.h acct.h decode.h conv.h daylog.h \
- graph_db.h err.h hosts_db.h str.h localip.h now.h
-cap.o: cap.c darkstat.h config.h cap.h conv.h decode.h hosts_db.h str.h \
- localip.h err.h
-conv.o: conv.c darkstat.h config.h conv.h err.h
-darkstat.o: darkstat.c darkstat.h config.h acct.h decode.h cap.h conv.h \
- daylog.h graph_db.h db.h dns.h http.h hosts_db.h str.h localip.h \
- ncache.h pidfile.h err.h now.h
-daylog.o: daylog.c darkstat.h config.h err.h daylog.h graph_db.h str.h \
- now.h
-db.o: db.c darkstat.h config.h err.h hosts_db.h str.h graph_db.h db.h
-decode.o: decode.c darkstat.h config.h acct.h decode.h cap.h err.h
-dns.o: dns.c darkstat.h config.h conv.h decode.h dns.h err.h hosts_db.h \
- str.h queue.h tree.h
-err.o: err.c darkstat.h config.h conv.h err.h pidfile.h
-graph_db.o: graph_db.c cap.h conv.h darkstat.h config.h db.h acct.h \
- decode.h err.h str.h html.h graph_db.h now.h
-hosts_db.o: hosts_db.c darkstat.h config.h conv.h decode.h dns.h err.h \
- hosts_db.h str.h db.h html.h ncache.h now.h
-hosts_sort.o: hosts_sort.c darkstat.h config.h hosts_db.h str.h err.h
-http.o: http.c darkstat.h config.h http.h conv.h hosts_db.h str.h \
- graph_db.h err.h queue.h now.h stylecss.h graphjs.h
-localip.o: localip.c darkstat.h config.h conv.h decode.h err.h localip.h
-ncache.o: ncache.c darkstat.h config.h conv.h err.h ncache.h tree.h
-pidfile.o: pidfile.c darkstat.h config.h err.h str.h pidfile.h
-str.o: str.c darkstat.h config.h conv.h err.h str.h
+acct.o: acct.c acct.h decode.h addr.h conv.h daylog.h graph_db.h err.h \
+ cdefs.h hosts_db.h localip.h now.h opt.h
+addr.o: addr.c addr.h
+bsd.o: bsd.c bsd.h config.h cdefs.h
+cap.o: cap.c acct.h cdefs.h cap.h config.h conv.h decode.h addr.h err.h \
+ hosts_db.h localip.h now.h opt.h queue.h str.h
+conv.o: conv.c conv.h err.h cdefs.h
+darkstat.o: darkstat.c acct.h cap.h cdefs.h config.h conv.h daylog.h \
+ graph_db.h db.h dns.h err.h http.h hosts_db.h addr.h localip.h ncache.h \
+ now.h pidfile.h
+daylog.o: daylog.c err.h cdefs.h daylog.h graph_db.h str.h now.h
+db.o: db.c cdefs.h err.h hosts_db.h addr.h graph_db.h db.h
+decode.o: decode.c cdefs.h decode.h addr.h err.h opt.h
+dns.o: dns.c cdefs.h conv.h decode.h addr.h dns.h err.h hosts_db.h \
+ queue.h str.h tree.h bsd.h config.h
+err.o: err.c cdefs.h err.h opt.h pidfile.h bsd.h config.h
+graph_db.o: graph_db.c cap.h conv.h db.h acct.h err.h cdefs.h str.h \
+ html.h graph_db.h now.h opt.h
+hosts_db.o: hosts_db.c cdefs.h conv.h decode.h addr.h dns.h err.h \
+ hosts_db.h db.h html.h ncache.h now.h opt.h str.h
+hosts_sort.o: hosts_sort.c cdefs.h err.h hosts_db.h addr.h
+html.o: html.c config.h str.h html.h opt.h
+http.o: http.c cdefs.h config.h conv.h err.h graph_db.h hosts_db.h addr.h \
+ http.h now.h queue.h str.h stylecss.h graphjs.h
+localip.o: localip.c addr.h bsd.h config.h conv.h err.h cdefs.h localip.h \
+ now.h
+ncache.o: ncache.c conv.h err.h cdefs.h ncache.h tree.h bsd.h config.h
+now.o: now.c err.h cdefs.h now.h
+pidfile.o: pidfile.c err.h cdefs.h str.h pidfile.h
+str.o: str.c conv.h err.h cdefs.h str.h