root/src/Makefile.in

Revision 29fae1d96b5afb603790249d4abcf226b7b16d45, 9.3 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 3 years ago)

Sooner or later, a corrupt jlog is going to make someone's life miserable.
We should have been shipping a tool to fix that all along. We'll ship it
as noit_jlogctl.

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