Use llu.
[darkstat] / Makefile.in
1 # darkstat 3
2 # copyright (c) 2001-2011 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 # Optimizations FIXME: dead code. push into autoconf?
25 #CPPFLAGS += -D__OPTIMIZE__
26
27 SRCS = \
28 acct.c \
29 addr.c \
30 bsd.c \
31 cap.c \
32 conv.c \
33 darkstat.c \
34 daylog.c \
35 db.c \
36 decode.c \
37 dns.c \
38 err.c \
39 graph_db.c \
40 hosts_db.c \
41 hosts_sort.c \
42 html.c \
43 http.c \
44 localip.c \
45 ncache.c \
46 now.c \
47 pidfile.c \
48 str.c
49
50 OBJS = $(SRCS:%.c=%.o)
51
52 STATICHS = \
53 stylecss.h \
54 graphjs.h
55
56 all: darkstat
57
58 darkstat: $(OBJS)
59 $(AM_V_LINK)
60 $(AM_V_at)$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
61
62 .c.o:
63 $(AM_V_CC)
64 $(AM_V_at)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
65
66 clean:
67 rm -f darkstat
68 rm -f $(OBJS)
69 rm -f $(STATICHS)
70 rm -f c-ify
71
72 depend: config.status $(STATICHS)
73 cp Makefile.in Makefile.in.old
74 sed '/^# Automatically generated dependencies$$/,$$d' \
75 <Makefile.in.old >Makefile.in
76 echo "# Automatically generated dependencies" >>Makefile.in
77 $(CPP) $(CPPFLAGS) -MM $(SRCS) >>Makefile.in
78 ./config.status
79 rm -f Makefile.in.old
80
81 show-dep:
82 @echo $(CPP) $(CPPFLAGS) -MM $(SRCS)
83
84 graphjs.h: static/graph.js
85 $(AM_V_CIFY)
86 $(AM_V_at)./c-ify graph_js <static/graph.js >$@
87
88 stylecss.h: static/style.css
89 $(AM_V_CIFY)
90 $(AM_V_at)./c-ify style_css <static/style.css >$@
91
92 $(STATICHS): c-ify
93 c-ify: static/c-ify.c
94 $(AM_V_HOSTCC)
95 $(AM_V_at)$(HOSTCC) $(HOSTCFLAGS) static/c-ify.c -o $@
96
97 install: darkstat
98 $(INSTALL) -d $(DESTDIR)$(sbindir)
99 $(INSTALL) -m 555 darkstat $(DESTDIR)$(sbindir)
100 $(INSTALL) -d $(DESTDIR)$(mandir)/man8
101 $(INSTALL) -m 444 darkstat.8 $(DESTDIR)$(mandir)/man8
102
103 .PHONY: all install clean depend show-dep
104
105 # silent-rules
106 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
107 AM_V_CC = $(am__v_CC_$(V))
108 am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
109 am__v_CC_0 = @echo " CC " $@;
110 AM_V_LINK = $(am__v_LINK_$(V))
111 am__v_LINK_ = $(am__v_LINK_$(AM_DEFAULT_VERBOSITY))
112 am__v_LINK_0 = @echo " LINK " $@;
113 AM_V_HOSTCC = $(am__v_HOSTCC_$(V))
114 am__v_HOSTCC_ = $(am__v_HOSTCC_$(AM_DEFAULT_VERBOSITY))
115 am__v_HOSTCC_0 = @echo " HOSTCC" $@;
116 AM_V_CIFY = $(am__v_CIFY_$(V))
117 am__v_CIFY_ = $(am__v_CIFY_$(AM_DEFAULT_VERBOSITY))
118 am__v_CIFY_0 = @echo " C-IFY " $@;
119 AM_V_at = $(am__v_at_$(V))
120 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
121 am__v_at_0 = @
122
123 # Automatically generated dependencies
124 acct.o: acct.c acct.h decode.h addr.h conv.h daylog.h graph_db.h err.h \
125 cdefs.h hosts_db.h localip.h now.h opt.h
126 addr.o: addr.c addr.h
127 bsd.o: bsd.c bsd.h config.h cdefs.h
128 cap.o: cap.c acct.h cdefs.h cap.h config.h conv.h decode.h addr.h err.h \
129 hosts_db.h localip.h now.h opt.h queue.h str.h
130 conv.o: conv.c conv.h err.h cdefs.h
131 darkstat.o: darkstat.c acct.h cap.h cdefs.h config.h conv.h daylog.h \
132 graph_db.h db.h dns.h err.h hosts_db.h addr.h http.h localip.h ncache.h \
133 now.h pidfile.h str.h
134 daylog.o: daylog.c cdefs.h err.h daylog.h graph_db.h str.h now.h
135 db.o: db.c cdefs.h err.h hosts_db.h addr.h graph_db.h db.h
136 decode.o: decode.c cdefs.h decode.h addr.h err.h opt.h
137 dns.o: dns.c cdefs.h conv.h decode.h addr.h dns.h err.h hosts_db.h \
138 queue.h str.h tree.h bsd.h config.h
139 err.o: err.c cdefs.h err.h opt.h pidfile.h bsd.h config.h
140 graph_db.o: graph_db.c cap.h conv.h db.h acct.h err.h cdefs.h str.h \
141 html.h graph_db.h now.h opt.h
142 hosts_db.o: hosts_db.c cdefs.h conv.h decode.h addr.h dns.h err.h \
143 hosts_db.h db.h html.h ncache.h now.h opt.h str.h
144 hosts_sort.o: hosts_sort.c cdefs.h err.h hosts_db.h addr.h
145 html.o: html.c config.h str.h cdefs.h html.h opt.h
146 http.o: http.c cdefs.h config.h conv.h err.h graph_db.h hosts_db.h addr.h \
147 http.h now.h queue.h str.h stylecss.h graphjs.h
148 localip.o: localip.c addr.h bsd.h config.h conv.h err.h cdefs.h localip.h \
149 now.h
150 ncache.o: ncache.c conv.h err.h cdefs.h ncache.h tree.h bsd.h config.h
151 now.o: now.c err.h cdefs.h now.h str.h
152 pidfile.o: pidfile.c err.h cdefs.h str.h pidfile.h
153 str.o: str.c conv.h err.h cdefs.h str.h