root/src/Makefile.in

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

install utils/noit_hooks.h

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