Restore pre-IPv6 localip_update() code for systems without ifaddrs.h
[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 # silent-rules
8 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
9 AM_V_CC = $(am__v_CC_$(V))
10 am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
11 am__v_CC_0 = @echo " CC " $@;
12 AM_V_at = $(am__v_at_$(V))
13 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
14 am__v_at_0 = @
15
16 CC = @CC@
17 CFLAGS = @CFLAGS@
18 CPP = @CPP@
19 CPPFLAGS = @CPPFLAGS@
20 INSTALL = @INSTALL@
21 LDFLAGS = @LDFLAGS@
22 LIBS = @LIBS@
23
24 HOSTCC ?= $(CC)
25 HOSTCFLAGS ?= $(CFLAGS)
26
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29 sbindir = @sbindir@
30 datarootdir = @datarootdir@
31 mandir = @mandir@
32
33 # Optimizations FIXME: dead code. push into autoconf?
34 #CPPFLAGS += -D__OPTIMIZE__
35
36 SRCS = \
37 acct.c \
38 addr.c \
39 cap.c \
40 conv.c \
41 darkstat.c \
42 daylog.c \
43 db.c \
44 decode.c \
45 dns.c \
46 err.c \
47 graph_db.c \
48 hosts_db.c \
49 hosts_sort.c \
50 html.c \
51 http.c \
52 localip.c \
53 ncache.c \
54 pidfile.c \
55 str.c
56
57 OBJS = $(SRCS:%.c=%.o)
58
59 STATICHS = \
60 stylecss.h \
61 graphjs.h
62
63 all: darkstat
64
65 darkstat: $(OBJS)
66 $(AM_V_CC)
67 $(AM_V_at)$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
68
69 .c.o:
70 $(AM_V_CC)
71 $(AM_V_at)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
72
73 clean:
74 rm -f darkstat
75 rm -f $(OBJS)
76 rm -f $(STATICHS)
77 rm -f c-ify
78
79 depend: config.status $(STATICHS)
80 cp Makefile.in Makefile.in.old
81 sed '/^# Automatically generated dependencies$$/,$$d' \
82 <Makefile.in.old >Makefile.in
83 echo "# Automatically generated dependencies" >>Makefile.in
84 $(CPP) $(CPPFLAGS) -MM $(SRCS) >>Makefile.in
85 ./config.status
86 rm -f Makefile.in.old
87
88 show-dep:
89 @echo $(CPP) $(CPPFLAGS) -MM $(SRCS)
90
91 # Statics: (FIXME?)
92 graphjs.h: static/graph.js c-ify
93 ./c-ify graph_js <static/graph.js >$@
94
95 stylecss.h: static/style.css c-ify
96 ./c-ify style_css <static/style.css >$@
97
98 c-ify: static/c-ify.c
99 $(AM_V_CC)
100 $(AM_V_at)$(HOSTCC) $(HOSTCFLAGS) static/c-ify.c -o $@
101
102 install: darkstat
103 $(INSTALL) -d $(DESTDIR)$(sbindir)
104 $(INSTALL) -m 555 darkstat $(DESTDIR)$(sbindir)
105 $(INSTALL) -d $(DESTDIR)$(mandir)/man8
106 $(INSTALL) -m 444 darkstat.8 $(DESTDIR)$(mandir)/man8
107
108 .PHONY: all install clean depend show-dep
109
110 # Automatically generated dependencies
111 acct.o: acct.c acct.h decode.h addr.h conv.h config.h daylog.h graph_db.h \
112 err.h cdefs.h hosts_db.h localip.h now.h opt.h
113 addr.o: addr.c addr.h
114 cap.o: cap.c cdefs.h cap.h config.h conv.h decode.h addr.h hosts_db.h \
115 localip.h opt.h err.h
116 conv.o: conv.c cdefs.h config.h conv.h err.h
117 darkstat.o: darkstat.c acct.h cap.h cdefs.h config.h conv.h daylog.h \
118 graph_db.h db.h dns.h err.h http.h hosts_db.h addr.h localip.h ncache.h \
119 pidfile.h now.h
120 daylog.o: daylog.c err.h cdefs.h daylog.h graph_db.h str.h now.h
121 db.o: db.c cdefs.h err.h hosts_db.h addr.h graph_db.h db.h
122 decode.o: decode.c cdefs.h acct.h cap.h config.h decode.h addr.h err.h \
123 opt.h
124 dns.o: dns.c cdefs.h conv.h config.h decode.h addr.h dns.h err.h \
125 hosts_db.h queue.h str.h tree.h
126 err.o: err.c cdefs.h conv.h config.h err.h opt.h pidfile.h
127 graph_db.o: graph_db.c cap.h conv.h config.h db.h acct.h err.h cdefs.h \
128 str.h html.h graph_db.h now.h opt.h
129 hosts_db.o: hosts_db.c cdefs.h conv.h config.h decode.h addr.h dns.h \
130 err.h hosts_db.h db.h html.h ncache.h now.h opt.h str.h
131 hosts_sort.o: hosts_sort.c cdefs.h err.h hosts_db.h addr.h
132 html.o: html.c config.h str.h html.h opt.h
133 http.o: http.c cdefs.h config.h conv.h err.h graph_db.h hosts_db.h addr.h \
134 http.h now.h queue.h str.h stylecss.h graphjs.h
135 localip.o: localip.c addr.h config.h conv.h err.h cdefs.h localip.h
136 ncache.o: ncache.c conv.h config.h err.h cdefs.h ncache.h tree.h
137 pidfile.o: pidfile.c err.h cdefs.h str.h pidfile.h
138 str.o: str.c conv.h config.h err.h cdefs.h str.h