root/src/Makefile.in

Revision bd6d64f84276dfd6f5c69702a74e5dbc691b389c, 10.6 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 2 years ago)

import yajl and switch the httptrap check to use it

  • 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 DEPFLAGS=@DEPFLAGS@
9 AR=@AR@
10 RANLIB=@RANLIB@
11 LIBS=@LIBS@
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 DTRACEOBJ=@DTRACEOBJ@
36 NOITD_DTRACEOBJ=$(DTRACEOBJ:%dtrace_stub.o=noitd_%dtrace_stub.o)
37 STRATCOND_DTRACEOBJ=$(DTRACEOBJ:%dtrace_stub.o=stratcond_%dtrace_stub.o)
38
39 TARGETS=noitd stratcond noit.conf test-noit.conf stratcon.conf test-stratcon.conf \
40         jlog/jlogctl
41
42 MODDIR=modules
43
44 HEADERS=noit_capabilities_listener.h noit_check.h noit_check_resolver.h \
45         noit_check_rest.h \
46         noit_check_tools_shared.h \
47         noit_check_tools.h noit_conf.h noit_conf_checks.h noit_conf_private.h \
48         noit_version.h \
49         noit_config.h noit_console.h noit_console_telnet.h noit_defines.h \
50         noit_filters.h noit_http.h noit_jlog_listener.h noit_listener.h \
51         noit_livestream_listener.h noit_main.h noit_module.h noit_rest.h \
52         noit_tokenizer.h noit_xml.h \
53         stratcon_datastore.h stratcon_iep.h stratcon_jlog_streamer.h \
54         stratcon_realtime_http.h \
55         eventer/OETS_asn1_helper.h eventer/eventer.h \
56         eventer/eventer_POSIX_fd_opset.h eventer/eventer_SSL_fd_opset.h \
57         eventer/eventer_jobq.h \
58         utils/noit_atomic.h utils/noit_b64.h utils/noit_hash.h \
59         utils/noit_log.h utils/noit_mkdir.h utils/noit_security.h \
60         utils/noit_sem.h utils/noit_skiplist.h utils/noit_str.h \
61         utils/noit_watchdog.h utils/noit_lockfile.h \
62         noitedit/chared.h noitedit/common.h noitedit/compat.h noitedit/el.h \
63         noitedit/el_term.h noitedit/emacs.h noitedit/fcns.h noitedit/fgetln.h \
64         noitedit/help.h noitedit/hist.h noitedit/histedit.h noitedit/key.h \
65         noitedit/map.h noitedit/parse.h noitedit/prompt.h noitedit/refresh.h \
66         noitedit/search.h noitedit/sig.h noitedit/strlcpy.h noitedit/sys.h \
67         noitedit/tokenizer.h noitedit/tty.h noitedit/vi.h \
68         jlog/jlog.h jlog/jlog_config.h jlog/jlog_hash.h jlog/jlog_io.h
69
70 NOIT_OBJS=noitd.o noit_main.o noit_listener.o \
71         noit_console.o noit_console_state.o noit_console_telnet.o \
72         noit_console_complete.o noit_check_resolver.o \
73         noit_check_tools_shared.o noit_check_log_helpers.o \
74         noit_check.o noit_check_log.o noit_check_tools.o \
75         noit_module.o noit_conf.o noit_conf_checks.o noit_tokenizer.o \
76         noit_capabilities_listener.o noit_xml.o \
77         noit_jlog_listener.o noit_livestream_listener.o noit_filters.o \
78         noit_http.o noit_rest.o noit_check_rest.o noit_filters_rest.o \
79         bundle.pb-c.o
80
81 NOIT_LIBS=libudns libnoitedit libeventer libjlog libnoit_utils libnoitjson libnoityajl
82 NOIT_LIB_FILES=udns/libudns.o noitedit/libnoitedit.a eventer/libeventer.a \
83         jlog/libjlog.a utils/libnoit_utils.a json-lib/libnoitjson.a yajl-lib/libnoityajl.a
84
85 STRATCON_OBJS=stratcond.o noit_main.o noit_listener.o \
86         noit_console.o noit_console_state.o noit_console_telnet.o \
87         noit_console_complete.o noit_xml.o \
88         noit_conf.o noit_http.o noit_rest.o noit_tokenizer.o \
89         noit_capabilities_listener.o noit_module.o \
90         noit_check_tools_shared.o noit_check_log_helpers.o \
91         stratcon_realtime_http.o \
92         stratcon_jlog_streamer.o stratcon_datastore.o \
93         stratcon_iep.o \
94         bundle.pb-c.o
95
96 STRATCON_LIBS=libudns libnoitedit libeventer libjlog libnoit_utils libnoitjson libnoityajl
97 STRATCON_LIB_FILES=udns/libudns.o noitedit/libnoitedit.a eventer/libeventer.a \
98         jlog/libjlog.a utils/libnoit_utils.a json-lib/libnoitjson.a yajl-lib/libnoityajl.a
99
100 all:    reversion $(NOIT_LIBS) $(STRATCON_LIBS) $(TARGETS) java-bits make-modules make-man
101
102 make-man:
103         @(cd man && $(MAKE) -s)
104
105 lua/liblua.lo:
106         @echo "- building lua bits"
107         @(cd lua && $(MAKE) -s liblua.lo)
108
109 make-modules:   lua/liblua.lo
110         @for dir in $(MODDIR) ; do \
111                 (cd $$dir && $(MAKE) -s) ; \
112         done
113
114 java-bits:
115         @-test -n "@JAVAPARTS@" && (cd java && $(MAKE) -s)
116
117 libjlog:
118         @(cd jlog && $(MAKE) -s libjlog.a)
119
120 jlog/jlogctl:
121         @echo "- building jlogctl"
122         @(cd jlog && $(MAKE) -s jlogctl)
123
124 libudns:
125         @(cd udns && $(MAKE) -s libudns.o)
126
127 libnoitedit:
128         @(cd noitedit && $(MAKE) -s libnoitedit.a)
129
130 libeventer:
131         @(cd eventer && $(MAKE) -s libeventer.a)
132
133 libnoit_utils:
134         @(cd utils && $(MAKE) -s libnoit_utils.a)
135
136 libnoitjson:
137         @(cd json-lib && $(MAKE) -s libnoitjson.a)
138
139 libnoityajl:
140         @(cd yajl-lib && $(MAKE) -s libnoityajl.a)
141
142 jlog/libjlog.a: libjlog
143 udns/libudns.o: libudns
144 noitedit/libnoitedit.a: libnoitedit
145 eventer/libeventer.a:   libeventer
146 utils/libnoit_utils.a:  libnoit_utils
147 json-lib/libnoitjson.a: libnoitjson
148 yajl-lib/libnoityajl.a: libnoityajl
149
150 .PHONY: reversion
151
152 reversion:
153         @$(top_srcdir)/buildtools/mkversion.sh noit_version.h
154
155 noit_version.h:
156         @$(top_srcdir)/buildtools/mkversion.sh noit_version.h
157
158 man/noitd.usage.h:      make-man
159
160 man/stratcond.usage.h:  make-man
161
162
163 noitd.o:        man/noitd.usage.h
164 stratcond.o:    man/stratcond.usage.h
165
166 stratcon_jlog_streamer.o:       @DTRACEHDR@
167 noit_check_tools.o:     @DTRACEHDR@
168 noit_check.o:   @DTRACEHDR@
169
170 stratcond_@DTRACEOBJ@:    $(STRATCON_OBJS)
171         @echo "- assembling $@" && \
172         @DTRACE@ @DTRACEFLAGS@ -Z -G -s dtrace_probes.d -o stratcond_@DTRACEOBJ@ $(STRATCON_OBJS)
173
174 noitd_@DTRACEOBJ@:    $(STRATCON_OBJS)
175         @echo "- assembling $@" && \
176         @DTRACE@ @DTRACEFLAGS@ -Z -G -s dtrace_probes.d -o noitd_@DTRACEOBJ@ $(NOIT_OBJS)
177
178 @DTRACEHDR@:    dtrace_probes.d
179         @if test -z "@DTRACE@" ; then \
180                 echo "- faking dtrace header" ; \
181                 cp ./@DTRACEHDR@.stock ./@DTRACEHDR@ ; \
182         else \
183                 echo "- building dtrace header" ; \
184                 @DTRACE@ -h -s dtrace_probes.d ; \
185         fi
186
187 noitd:  $(NOIT_OBJS) $(NOIT_LIB_FILES) man/noitd.usage.h $(NOITD_DTRACEOBJ)
188         @echo "- linking $@"
189         @$(CC) -o $@ $(NOIT_OBJS) \
190                 udns/libudns.o \
191                 $(NOITD_DTRACEOBJ) \
192                 $(LDFLAGS) \
193                 $(WHOLE_ARCHIVE) \
194                 eventer/*.o \
195                 utils/*.o \
196                 json-lib/*.o \
197                 yajl-lib/*.o \
198                 -Ljlog -ljlog \
199                 -Lnoitedit -lnoitedit \
200                 $(NOWHOLE_ARCHIVE) \
201                 $(LIBS)
202
203 stratcond:      $(STRATCON_OBJS) $(STRATCON_LIB_FILES) $(STRATCOND_DTRACEOBJ)
204         @echo "- linking $@"
205         @$(CC) -o $@ $(STRATCON_OBJS) \
206                 udns/libudns.o \
207                 $(STRATCOND_DTRACEOBJ) \
208                 $(LDFLAGS) \
209                 $(WHOLE_ARCHIVE) \
210                 eventer/*.o \
211                 utils/*.o \
212                 json-lib/*.o \
213                 yajl-lib/*.o \
214                 -Ljlog -ljlog \
215                 -Lnoitedit -lnoitedit \
216                 $(NOWHOLE_ARCHIVE) \
217                 $(LIBS)
218
219 stratcon_datastore.o:   stratcon_datastore.c
220         @echo "- compiling $<"
221         @$(CC) $(CPPFLAGS) $(PGCFLAGS) $(CFLAGS) -c $<
222
223 .c.o:
224         @echo "- compiling $<"
225         @$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
226
227 noit_module.o:  module-online.h
228
229 module-online.h:        modules/module-online.xsl
230         @echo "- making module-online.h (StyleSheet include)"
231         @$(XML2H) helpStyleXML < modules/module-online.xsl > $@
232
233 noit_tokenizer.c:
234         @echo "- re2c noit_tokenizer.re"
235         @re2c -o $@ noit_tokenizer.re
236
237 test-noit.conf: noit.conf.in Makefile
238         @sed -e "s^%sysconfdir%^`pwd`^g;" \
239                 -e "s^%modulesdir%^`pwd`/modules^g;" \
240                 -e "s^%modulesluadir%^`pwd`/modules-lua^g;" \
241                 -e "s^%PKIPREFIX%^../test/test-^g;" < \
242                 noit.conf.in > \
243                 test-noit.conf
244
245 noit.conf:      noit.conf.in Makefile
246         @sed -e "s^%sysconfdir%^$(sysconfdir)^g;" \
247                 -e "s^%modulesdir%^$(MODULES_DIR)^g;" \
248                 -e "s^%modulesluadir%^$(MODULES_DIR)^g;" \
249                 -e "s^%PKIPREFIX%^$${PKIPREFIX}^g;" < \
250                 noit.conf.in > \
251                 noit.conf
252
253 test-stratcon.conf:     stratcon.conf.in Makefile
254         @sed -e "s^%sysconfdir%^`pwd`^g;" \
255                 -e "s^%modulesdir%^`pwd`/modules^g;" \
256                 -e "s^%modulesluadir%^`pwd`/modules-lua^g;" \
257                 -e "s^%iepbindir%^`pwd`/java^g;" \
258                 -e "s^%iepdbdir%^`pwd`/java^g;" \
259                 -e "s^%PKIPREFIX%^../test/test-^g;" < \
260                 stratcon.conf.in > \
261                 test-stratcon.conf
262
263 stratcon.conf:  stratcon.conf.in Makefile
264         @sed -e "s^%sysconfdir%^$(sysconfdir)^g;" \
265                 -e "s^%modulesdir%^$(MODULES_DIR)^g;" \
266                 -e "s^%modulesluadir%^$(MODULES_DIR)^g;" \
267                 -e "s^%iepbindir%^$(bindir)^g;" \
268                 -e "s^%iepdbdir%^$(localstatedir)/db/noit-iep^g;" \
269                 -e "s^%PKIPREFIX%^$${PKIPREFIX}^g;" < \
270                 stratcon.conf.in > \
271                 stratcon.conf
272
273 install-dirs:
274         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(bindir)
275         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(sbindir)
276         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(sysconfdir)
277
278 install-headers:        $(HEADERS)
279         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(bindir)
280         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)
281         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/eventer
282         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/utils
283         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/noitedit
284         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/jlog
285         $(INSTALL) -m 0755 scripts/noit-config $(DESTDIR)$(bindir)/noit-config
286         for file in $(HEADERS) ; do \
287                 $(INSTALL) -m 0644 $$file $(DESTDIR)$(includedir)/$$file ; \
288         done
289
290 install-noitd:  install-dirs reversion noitd noit.conf java-bits jlog/jlogctl
291         $(INSTALL) -m 0755 scripts/noittrap $(DESTDIR)$(bindir)/noittrap
292         $(INSTALL) -m 0755 jlog/jlogctl $(DESTDIR)$(bindir)/noit_jlogctl
293         $(INSTALL) -m 0755 noitd $(DESTDIR)$(sbindir)/noitd
294         $(INSTALL) -m 0644 noit.conf $(DESTDIR)$(sysconfdir)/noit.conf.sample
295         $(INSTALL) -m 0644 config_templates.conf $(DESTDIR)$(sysconfdir)/config_templates.conf
296         $(INSTALL) -m 0644 default-ca-chain.crt $(DESTDIR)$(sysconfdir)/default-ca-chain.crt
297         (cd modules && $(MAKE) install-modules DESTDIR=$(DESTDIR))
298         (cd modules-lua && $(MAKE) install DESTDIR=$(DESTDIR))
299         -test -n "@JAVAPARTS@" && (cd @JAVAPARTS@ && $(MAKE) install-jezebel DESTDIR=$(DESTDIR))
300
301 install-stratcond:      install-dirs reversion stratcond stratcon.conf java-bits
302         $(INSTALL) -m 0755 stratcond $(DESTDIR)$(sbindir)/stratcond
303         $(INSTALL) -m 0644 stratcon.conf $(DESTDIR)$(sysconfdir)/stratcon.conf.sample
304         (cd modules && $(MAKE) install-smodules DESTDIR=$(DESTDIR))
305         -test -n "@JAVAPARTS@" && (cd @JAVAPARTS@ && $(MAKE) install-iep DESTDIR=$(DESTDIR))
306
307 install-docs:
308         (cd man && $(MAKE) install DESTDIR=$(DESTDIR))
309
310 install:        install-dirs install-docs install-headers install-noitd install-stratcond
311
312 clean:
313         rm -f *.o $(TARGETS)
314         rm -f module-online.h
315         (cd jlog && $(MAKE) clean)
316         (cd eventer && $(MAKE) clean)
317         (cd udns && $(MAKE) clean)
318         (cd man && $(MAKE) clean)
319         (cd modules && $(MAKE) clean)
320         (cd noitedit && $(MAKE) clean)
321         (cd utils && $(MAKE) clean)
322         (cd json-lib && $(MAKE) clean)
323         (cd yajl-lib && $(MAKE) clean)
324         (cd lua && $(MAKE) clean)
325         (cd java && $(MAKE) clean)
326
327 Makefile.dep:
328         $(CC) -I. $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) *.c > Makefile.dep
329         $(top_srcdir)/buildtools/culldeps.sh Makefile.dep
330
331 include Makefile.dep
332
333 distclean-subdirs:
334         for dir in jlog eventer udns man modules modules-lua noitedit utils json-lib yajl-lib lua java ; do \
335                 (cd $$dir && $(MAKE) distclean) ; \
336         done
337
338 distclean:      clean distclean-subdirs
339         rm -f Makefile noit_config.h scripts/noit-config
340
Note: See TracBrowser for help on using the browser.