root/src/Makefile.in

Revision 4c7aa255f411de003f93889920a5446f00a34c50, 8.4 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)

cleaner clean from Marti Raudsepp

  • Property mode set to 100644
Line 
1 .SUFFIXES: .re .c
2
3 CC=@CC@
4 CPPFLAGS=@CPPFLAGS@
5 CFLAGS=@CFLAGS@
6 PGCFLAGS=@PGCFLAGS@
7 LDFLAGS=@LDFLAGS@
8 AR=@AR@
9 RANLIB=@RANLIB@
10 LIBS=@LIBS@
11 PGLIBS=@PGLIBS@
12 INSTALL=@INSTALL@
13 XML2H=@top_srcdir@/buildtools/xml2h
14
15 prefix=@prefix@
16 exec_prefix=@exec_prefix@
17 bindir=@bindir@
18 sbindir=@sbindir@
19 libdir=@libdir@
20 includedir=${prefix}/include
21 libexecdir=@libexecdir@
22 localstatedir=@localstatedir@
23 datarootdir=@datarootdir@
24 mandir=@mandir@
25 mansubdir=@mansubdir@
26 docdir=${prefix}/@docdir@
27 sysconfdir=@sysconfdir@
28 srcdir=@srcdir@
29 top_srcdir=@top_srcdir@
30 MODULES_DIR=@MODULES_DIR@
31
32 WHOLE_ARCHIVE=@WHOLE_ARCHIVE@
33 NOWHOLE_ARCHIVE=@NOWHOLE_ARCHIVE@
34
35 TARGETS=noitd stratcond noit.conf test-noit.conf stratcon.conf test-stratcon.conf
36
37 MODDIR=modules
38
39 HEADERS=noit_capabilities_listener.h noit_check.h noit_check_rest.h \
40         noit_check_tools.h noit_conf.h noit_conf_checks.h noit_conf_private.h \
41         noit_config.h noit_console.h noit_console_telnet.h noit_defines.h \
42         noit_filters.h noit_http.h noit_jlog_listener.h noit_listener.h \
43         noit_livestream_listener.h noit_module.h noit_rest.h noit_tokenizer.h \
44         noit_xml.h \
45         stratcon_datastore.h stratcon_iep.h stratcon_jlog_streamer.h \
46         stratcon_realtime_http.h \
47         eventer/OETS_asn1_helper.h eventer/eventer.h \
48         eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \
49         eventer/eventer_jobq.h \
50         utils/noit_atomic.h utils/noit_b64.h utils/noit_hash.h \
51         utils/noit_log.h utils/noit_mkdir.h utils/noit_security.h \
52         utils/noit_sem.h utils/noit_skiplist.h utils/noit_str.h \
53         utils/noit_watchdog.h utils/noit_lockfile.h \
54         noitedit/chared.h noitedit/common.h noitedit/compat.h noitedit/el.h \
55         noitedit/el_term.h noitedit/emacs.h noitedit/fcns.h noitedit/fgetln.h \
56         noitedit/help.h noitedit/hist.h noitedit/histedit.h noitedit/key.h \
57         noitedit/map.h noitedit/parse.h noitedit/prompt.h noitedit/refresh.h \
58         noitedit/search.h noitedit/sig.h noitedit/strlcpy.h noitedit/sys.h \
59         noitedit/tokenizer.h noitedit/tty.h noitedit/vi.h \
60         jlog/jlog.h jlog/jlog_config.h jlog/jlog_hash.h jlog/jlog_io.h
61
62 NOIT_OBJS=noitd.o noit_listener.o \
63         noit_console.o noit_console_state.o noit_console_telnet.o \
64         noit_console_complete.o \
65         noit_check.o noit_check_log.o noit_check_tools.o \
66         noit_module.o noit_conf.o noit_conf_checks.o noit_tokenizer.o \
67         noit_capabilities_listener.o noit_xml.o \
68         noit_jlog_listener.o noit_livestream_listener.o noit_filters.o \
69         noit_http.o noit_rest.o noit_check_rest.o noit_filters_rest.o
70
71 NOIT_LIBS=udns/libudns.o noitedit/libnoitedit.a eventer/libeventer.a \
72         jlog/libjlog.a utils/libnoit_utils.a json-lib/libnoitjson.a
73
74 STRATCON_OBJS=stratcond.o noit_listener.o \
75         noit_console.o noit_console_state.o noit_console_telnet.o \
76         noit_console_complete.o noit_xml.o \
77         noit_conf.o noit_http.o noit_rest.o noit_tokenizer.o \
78         noit_capabilities_listener.o noit_module.o \
79         stratcon_realtime_http.o \
80         stratcon_jlog_streamer.o stratcon_datastore.o \
81         stratcon_iep.o
82
83 STRATCON_LIBS=udns/libudns.o noitedit/libnoitedit.a eventer/libeventer.a \
84         jlog/libjlog.a utils/libnoit_utils.a json-lib/libnoitjson.a
85
86 all:    $(TARGETS) java-bits make-modules make-man
87
88 make-man:
89         @(cd man && make -s)
90
91 lua/liblua.lo:
92         @echo "- building lua bits"
93         @(cd lua && make -s liblua.lo)
94
95 make-modules:   lua/liblua.lo
96         @for dir in $(MODDIR) ; do \
97                 (cd $$dir && make -s) ; \
98         done
99
100 java-bits:
101         @-test -n "@JAVAPARTS@" && (cd java && make -s)
102
103 jlog/libjlog.a:
104         @echo "- building jlog bits"
105         @(cd jlog && make -s libjlog.a)
106
107 udns/libudns.o:
108         @echo "- building udns bits"
109         @(cd udns && make -s libudns.o)
110
111 noitedit/libnoitedit.a:
112         @echo "- building noitedit bits"
113         @(cd noitedit && make -s libnoitedit.a)
114
115 eventer/libeventer.a:
116         @echo "- building eventer bits"
117         @(cd eventer && make -s libeventer.a)
118
119 utils/libnoit_utils.a:
120         @echo "- building utils bits"
121         @(cd utils && make -s libnoit_utils.a)
122
123 json-lib/libnoitjson.a:
124         @echo "- building json bits"
125         @(cd json-lib && make -s libnoitjson.a)
126
127 man/noitd.usage.h:      make-man
128
129 man/stratcond.usage.h:  make-man
130
131 noitd.o:        man/noitd.usage.h
132 stratcond.o:    man/stratcond.usage.h
133
134 noitd:  $(NOIT_OBJS) $(NOIT_LIBS) man/noitd.usage.h
135         @$(CC) -o $@ $(NOIT_OBJS) \
136                 udns/libudns.o \
137                 $(LDFLAGS) \
138                 $(WHOLE_ARCHIVE) \
139                 -Leventer -leventer \
140                 utils/*.o \
141                 json-lib/*.o \
142                 -Ljlog -ljlog \
143                 -Lnoitedit -lnoitedit \
144                 $(NOWHOLE_ARCHIVE) \
145                 $(LIBS)
146         @echo "- linking $@"
147
148 stratcond:      $(STRATCON_OBJS) $(STRATCON_LIBS)
149         @$(CC) -o $@ $(STRATCON_OBJS) \
150                 udns/libudns.o \
151                 $(LDFLAGS) \
152                 $(WHOLE_ARCHIVE) \
153                 -Leventer -leventer \
154                 utils/*.o \
155                 json-lib/*.o \
156                 -Ljlog -ljlog \
157                 -Lnoitedit -lnoitedit \
158                 $(NOWHOLE_ARCHIVE) \
159                 $(LIBS) $(PGLIBS)
160         @echo "- linking $@"
161
162 stratcon_datastore.o:   stratcon_datastore.c
163         @$(CC) $(CPPFLAGS) $(PGCFLAGS) $(CFLAGS) -c $<
164         @echo "- compiling $<"
165
166 .c.o:
167         @$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
168         @echo "- compiling $<"
169
170 noit_module.o:  module-online.h
171
172 module-online.h:        modules/module-online.xsl
173         @echo "- making module-online.h (StyleSheet include)"
174         @$(XML2H) helpStyleXML < modules/module-online.xsl > $@
175
176 noit_tokenizer.c:       noit_tokenizer.re
177         @re2c -o $@ noit_tokenizer.re
178         @echo "- re2c noit_tokenizer.re"
179
180 test-noit.conf: noit.conf.in Makefile
181         @sed -e "s^%sysconfdir%^`pwd`^g;" \
182                 -e "s^%modulesdir%^`pwd`/modules^g;" \
183                 -e "s^%modulesluadir%^`pwd`/modules-lua^g;" \
184                 -e "s^%PKIPREFIX%^../test/test-^g;" < \
185                 noit.conf.in > \
186                 test-noit.conf
187
188 noit.conf:      noit.conf.in Makefile
189         @sed -e "s^%sysconfdir%^$(sysconfdir)^g;" \
190                 -e "s^%modulesdir%^$(MODULES_DIR)^g;" \
191                 -e "s^%modulesluadir%^$(MODULES_DIR)^g;" \
192                 -e "s^%PKIPREFIX%^$${PKIPREFIX}^g;" < \
193                 noit.conf.in > \
194                 noit.conf
195
196 test-stratcon.conf:     stratcon.conf.in Makefile
197         @sed -e "s^%sysconfdir%^`pwd`^g;" \
198                 -e "s^%modulesdir%^`pwd`/modules^g;" \
199                 -e "s^%modulesluadir%^`pwd`/modules-lua^g;" \
200                 -e "s^%iepbindir%^`pwd`/java^g;" \
201                 -e "s^%iepdbdir%^`pwd`/java^g;" \
202                 -e "s^%PKIPREFIX%^../test/test-^g;" < \
203                 stratcon.conf.in > \
204                 test-stratcon.conf
205
206 stratcon.conf:  stratcon.conf.in Makefile
207         @sed -e "s^%sysconfdir%^$(sysconfdir)^g;" \
208                 -e "s^%modulesdir%^$(MODULES_DIR)^g;" \
209                 -e "s^%modulesluadir%^$(MODULES_DIR)^g;" \
210                 -e "s^%iepbindir%^$(bindir)^g;" \
211                 -e "s^%iepdbdir%^$(localstatedir)/db/noit-iep^g;" \
212                 -e "s^%PKIPREFIX%^$${PKIPREFIX}^g;" < \
213                 stratcon.conf.in > \
214                 stratcon.conf
215
216 install-dirs:
217         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(bindir)
218         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(sbindir)
219         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(sysconfdir)
220
221 install-headers:        $(HEADERS)
222         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(bindir)
223         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)
224         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/eventer
225         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/utils
226         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/noitedit
227         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/jlog
228         $(INSTALL) -m 0755 scripts/noit-config $(DESTDIR)$(bindir)/noit-config
229         for file in $(HEADERS) ; do \
230                 $(INSTALL) -m 0644 $$file $(DESTDIR)$(includedir)/$$file ; \
231         done
232
233 install-noitd:  install-dirs noitd noit.conf java-bits
234         $(INSTALL) -m 0755 scripts/noittrap $(DESTDIR)$(bindir)/noittrap
235         $(INSTALL) -m 0755 noitd $(DESTDIR)$(sbindir)/noitd
236         $(INSTALL) -m 0644 noit.conf $(DESTDIR)$(sysconfdir)/noit.conf.sample
237         $(INSTALL) -m 0644 config_templates.conf $(DESTDIR)$(sysconfdir)/config_templates.conf
238         $(INSTALL) -m 0644 default-ca-chain.crt $(DESTDIR)$(sysconfdir)/default-ca-chain.crt
239         (cd modules && make install-modules DESTDIR=$(DESTDIR))
240         (cd modules-lua && make install DESTDIR=$(DESTDIR))
241         -test -n "@JAVAPARTS@" && (cd @JAVAPARTS@ && make install-jezebel DESTDIR=$(DESTDIR))
242
243 install-stratcond:      install-dirs stratcond stratcon.conf java-bits
244         $(INSTALL) -m 0755 stratcond $(DESTDIR)$(sbindir)/stratcond
245         $(INSTALL) -m 0644 stratcon.conf $(DESTDIR)$(sysconfdir)/stratcon.conf.sample
246         (cd modules && make install-smodules DESTDIR=$(DESTDIR))
247         -test -n "@JAVAPARTS@" && (cd @JAVAPARTS@ && make install-iep DESTDIR=$(DESTDIR))
248
249 install-docs:
250         (cd man && make install DESTDIR=$(DESTDIR))
251
252 install:        install-dirs install-docs install-headers install-noitd install-stratcond
253
254 clean:
255         rm -f *.o $(TARGETS)
256         rm -f module-online.h
257         (cd jlog && make clean)
258         (cd eventer && make clean)
259         (cd udns && make clean)
260         (cd man && make clean)
261         (cd modules && make clean)
262         (cd noitedit && make clean)
263         (cd utils && make clean)
264         (cd json-lib && make clean)
265         (cd lua && make clean)
266         (cd java && make clean)
267
268 Makefile.dep:
269         gcc -MM *.c > Makefile.dep
270
271 include Makefile.dep
272
Note: See TracBrowser for help on using the browser.