1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
|
# vim:set ts=8 sw=8 sts=8 noet:
#
# darkstat 3
# copyright (c) 2001-2016 Emil Mikulic.
#
# You may use, modify and redistribute this file under the terms of the
# GNU General Public License version 2. (see COPYING.GPL)
#
# To rebuild Makefile from Makefile.in, run: ./config.status
# For verbose output, run: make V=1
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INSTALL = @INSTALL@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
HOSTCC ?= $(CC)
HOSTCFLAGS ?= $(CFLAGS)
prefix = @prefix@
exec_prefix = @exec_prefix@
sbindir = @sbindir@
datarootdir = @datarootdir@
mandir = @mandir@
SRCS = \
acct.c \
addr.c \
bsd.c \
cap.c \
conv.c \
darkstat.c \
daylog.c \
db.c \
decode.c \
dns.c \
err.c \
graph_db.c \
hosts_db.c \
hosts_sort.c \
html.c \
http.c \
linktypes.c \
localip.c \
ncache.c \
now.c \
pidfile.c \
str.c
TEST_SRCS = \
addr_test.c \
linktypes_test.c
OBJS = $(SRCS:%.c=%.o)
TEST_OBJS = $(TEST_SRCS:%.c=%.o)
STATICHS = \
favicon.h \
stylecss.h \
graphjs.h
all: darkstat
darkstat: $(OBJS)
$(AM_V_LINK)
$(AM_V_at)$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
.c.o:
$(AM_V_CC)
$(AM_V_at)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean:
rm -f darkstat
rm -f $(OBJS)
rm -f $(TEST_OBJS)
rm -f $(STATICHS)
rm -f hex-ify c-ify
rm -f addr_test linktypes_test
depend: config.status $(STATICHS)
cp Makefile.in Makefile.in.old
sed '/^# Automatically generated dependencies$$/,$$d' \
<Makefile.in.old >Makefile.in
echo "# Automatically generated dependencies" >>Makefile.in
$(CC) $(CPPFLAGS) -MM $(SRCS) $(TEST_SRCS) >>Makefile.in
./config.status
rm -f Makefile.in.old
favicon.h: static/favicon.png hex-ify
$(AM_V_HEXIFY)
$(AM_V_at)./hex-ify favicon_png <static/favicon.png >$@
graphjs.h: static/graph.js c-ify
$(AM_V_CIFY)
$(AM_V_at)./c-ify graph_js <static/graph.js >$@
stylecss.h: static/style.css c-ify
$(AM_V_CIFY)
$(AM_V_at)./c-ify style_css <static/style.css >$@
hex-ify: static/hex-ify.c
$(AM_V_HOSTCC)
$(AM_V_at)$(HOSTCC) $(HOSTCFLAGS) static/hex-ify.c -o $@
c-ify: static/c-ify.c
$(AM_V_HOSTCC)
$(AM_V_at)$(HOSTCC) $(HOSTCFLAGS) static/c-ify.c -o $@
install: darkstat
$(INSTALL) -d $(DESTDIR)$(sbindir)
$(INSTALL) -m 555 darkstat $(DESTDIR)$(sbindir)
$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(INSTALL) -m 444 darkstat.8 $(DESTDIR)$(mandir)/man8
# Testing.
addr_test: addr_test.o addr.o
$(AM_V_LINK)
$(AM_V_at)$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) -o $@
linktypes_test: linktypes_test.o linktypes.o
$(AM_V_LINK)
$(AM_V_at)$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) -o $@
check: addr_test linktypes_test
./addr_test
./linktypes_test
@echo All tests pass.
.PHONY: all install clean depend check
# 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_HEXIFY = $(am__v_HEXIFY_$(V))
am__v_HEXIFY_ = $(am__v_HEXIFY_$(AM_DEFAULT_VERBOSITY))
am__v_HEXIFY_0 = @echo " HEX-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 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 linktypes.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 hosts_db.h addr.h http.h localip.h ncache.h \
now.h pidfile.h str.h
daylog.o: daylog.c cdefs.h err.h daylog.h graph_db.h str.h now.h
db.o: db.c err.h cdefs.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 cap.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 cdefs.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 favicon.h
linktypes.o: linktypes.c linktypes_list.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 str.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
addr_test.o: addr_test.c addr.h
linktypes_test.o: linktypes_test.c linktypes.h
|