-D__OPTIMIZE__ comes from -O anyway.
[darkstat] / Makefile.in
1 # darkstat 3
2 # copyright (c) 2001-2014 Emil Mikulic.
3 #
4 # You may use, modify and redistribute this file under the terms of the
5 # GNU General Public License version 2. (see COPYING.GPL)
6
7 CC = @CC@
8 CFLAGS = @CFLAGS@
9 CPP = @CPP@
10 CPPFLAGS = @CPPFLAGS@
11 INSTALL = @INSTALL@
12 LDFLAGS = @LDFLAGS@
13 LIBS = @LIBS@
14
15 HOSTCC ?= $(CC)
16 HOSTCFLAGS ?= $(CFLAGS)
17
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20 sbindir = @sbindir@
21 datarootdir = @datarootdir@
22 mandir = @mandir@
23
24 SRCS = \
25 acct.c \
26 addr.c \
27 bsd.c \
28 cap.c \
29 conv.c \
30 darkstat.c \
31 daylog.c \
32 db.c \
33 decode.c \
34 dns.c \
35 err.c \
36 graph_db.c \
37 hosts_db.c \
38 hosts_sort.c \
39 html.c \
40 http.c \
41 localip.c \
42 ncache.c \
43 now.c \
44 pidfile.c \
45 str.c
46
47 OBJS = $(SRCS:%.c=%.o)
48
49 STATICHS = \
50 stylecss.h \
51 graphjs.h
52
53 all: darkstat
54
55 darkstat: $(OBJS)
56 $(AM_V_LINK)
57 $(AM_V_at)$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
58
59 .c.o:
60 $(AM_V_CC)
61 $(AM_V_at)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
62
63 clean:
64 rm -f darkstat
65 rm -f $(OBJS)
66 rm -f $(STATICHS)
67 rm -f c-ify
68
69 depend: config.status $(STATICHS)
70 cp Makefile.in Makefile.in.old
71 sed '/^# Automatically generated dependencies$$/,$$d' \
72 <Makefile.in.old >Makefile.in
73 echo "# Automatically generated dependencies" >>Makefile.in
74 $(CPP) $(CPPFLAGS) -MM $(SRCS) >>Makefile.in
75 ./config.status
76 rm -f Makefile.in.old
77
78 show-dep:
79 @echo $(CPP) $(CPPFLAGS) -MM $(SRCS)
80
81 graphjs.h: static/graph.js
82 $(AM_V_CIFY)
83 $(AM_V_at)./c-ify graph_js <static/graph.js >$@
84
85 stylecss.h: static/style.css
86 $(AM_V_CIFY)
87 $(AM_V_at)./c-ify style_css <static/style.css >$@
88
89 $(STATICHS): c-ify
90 c-ify: static/c-ify.c
91 $(AM_V_HOSTCC)
92 $(AM_V_at)$(HOSTCC) $(HOSTCFLAGS) static/c-ify.c -o $@
93
94 install: darkstat
95 $(INSTALL) -d $(DESTDIR)$(sbindir)
96 $(INSTALL) -m 555 darkstat $(DESTDIR)$(sbindir)
97 $(INSTALL) -d $(DESTDIR)$(mandir)/man8
98 $(INSTALL) -m 444 darkstat.8 $(DESTDIR)$(mandir)/man8
99
100 .PHONY: all install clean depend show-dep
101
102 # silent-rules
103 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
104 AM_V_CC = $(am__v_CC_$(V))
105 am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
106 am__v_CC_0 = @echo " CC " $@;
107 AM_V_LINK = $(am__v_LINK_$(V))
108 am__v_LINK_ = $(am__v_LINK_$(AM_DEFAULT_VERBOSITY))
109 am__v_LINK_0 = @echo " LINK " $@;
110 AM_V_HOSTCC = $(am__v_HOSTCC_$(V))
111 am__v_HOSTCC_ = $(am__v_HOSTCC_$(AM_DEFAULT_VERBOSITY))
112 am__v_HOSTCC_0 = @echo " HOSTCC" $@;
113 AM_V_CIFY = $(am__v_CIFY_$(V))
114 am__v_CIFY_ = $(am__v_CIFY_$(AM_DEFAULT_VERBOSITY))
115 am__v_CIFY_0 = @echo " C-IFY " $@;
116 AM_V_at = $(am__v_at_$(V))
117 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
118 am__v_at_0 = @
119
120 # Automatically generated dependencies
121 acct.o: acct.c acct.h decode.h addr.h conv.h daylog.h graph_db.h err.h \
122 cdefs.h hosts_db.h localip.h now.h opt.h
123 addr.o: addr.c addr.h
124 bsd.o: bsd.c bsd.h config.h cdefs.h
125 cap.o: cap.c acct.h cdefs.h cap.h config.h conv.h decode.h addr.h err.h \
126 hosts_db.h localip.h now.h opt.h queue.h str.h
127 conv.o: conv.c conv.h err.h cdefs.h
128 darkstat.o: darkstat.c acct.h cap.h cdefs.h config.h conv.h daylog.h \
129 graph_db.h db.h dns.h err.h hosts_db.h addr.h http.h localip.h ncache.h \
130 now.h pidfile.h str.h
131 daylog.o: daylog.c cdefs.h err.h daylog.h graph_db.h str.h now.h
132 db.o: db.c cdefs.h err.h hosts_db.h addr.h graph_db.h db.h
133 decode.o: decode.c cdefs.h decode.h addr.h err.h opt.h
134 dns.o: dns.c cdefs.h conv.h decode.h addr.h dns.h err.h hosts_db.h \
135 queue.h str.h tree.h bsd.h config.h
136 err.o: err.c cdefs.h err.h opt.h pidfile.h bsd.h config.h
137 graph_db.o: graph_db.c cap.h conv.h db.h acct.h err.h cdefs.h str.h \
138 html.h graph_db.h now.h opt.h
139 hosts_db.o: hosts_db.c cdefs.h conv.h decode.h addr.h dns.h err.h \
140 hosts_db.h db.h html.h ncache.h now.h opt.h str.h
141 hosts_sort.o: hosts_sort.c cdefs.h err.h hosts_db.h addr.h
142 html.o: html.c config.h str.h cdefs.h html.h opt.h
143 http.o: http.c cdefs.h config.h conv.h err.h graph_db.h hosts_db.h addr.h \
144 http.h now.h queue.h str.h stylecss.h graphjs.h
145 localip.o: localip.c addr.h bsd.h config.h conv.h err.h cdefs.h localip.h \
146 now.h
147 ncache.o: ncache.c conv.h err.h cdefs.h ncache.h tree.h bsd.h config.h
148 now.o: now.c err.h cdefs.h now.h str.h
149 pidfile.o: pidfile.c err.h cdefs.h str.h pidfile.h
150 str.o: str.c conv.h err.h cdefs.h str.h