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