root/src/Makefile.in

Revision 191ce1d37e96ab06d4218f01a6c813946fdd6d82, 10.2 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 3 years ago)

correct the phony target

  • 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_module.h noit_rest.h noit_tokenizer.h \
52         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_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
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
84
85 STRATCON_OBJS=stratcond.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
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
99
100 all:    $(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 jlog/libjlog.a: libjlog
140 udns/libudns.o: libudns
141 noitedit/libnoitedit.a: libnoitedit
142 eventer/libeventer.a:   libeventer
143 utils/libnoit_utils.a:  libnoit_utils
144 json-lib/libnoitjson.a: libnoitjson
145
146 .PHONY: reversion
147
148 reversion:
149         @$(top_srcdir)/buildtools/mkversion.sh noit_version.h
150
151 noit_version.h:
152         @$(top_srcdir)/buildtools/mkversion.sh noit_version.h
153
154 man/noitd.usage.h:      make-man
155
156 man/stratcond.usage.h:  make-man
157
158
159 noitd.o:        man/noitd.usage.h
160 stratcond.o:    man/stratcond.usage.h
161
162 stratcon_jlog_streamer.o:       @DTRACEHDR@
163 noit_check_tools.o:     @DTRACEHDR@
164 noit_check.o:   @DTRACEHDR@
165
166 stratcond_@DTRACEOBJ@:    $(STRATCON_OBJS)
167         @-test -n "@DTRACE@" && \
168         @DTRACE@ @DTRACEFLAGS@ -Z -G -s dtrace_probes.d -o stratcond_@DTRACEOBJ@ $(STRATCON_OBJS)
169
170 noitd_@DTRACEOBJ@:    $(STRATCON_OBJS)
171         @-test -n "@DTRACE@" && \
172         @DTRACE@ @DTRACEFLAGS@ -Z -G -s dtrace_probes.d -o noitd_@DTRACEOBJ@ $(NOIT_OBJS)
173
174 @DTRACEHDR@:    dtrace_probes.d
175         @-test -n "@DTRACE@" && @DTRACE@ -h -s dtrace_probes.d
176
177 noitd:  reversion $(NOIT_OBJS) $(NOIT_LIB_FILES) man/noitd.usage.h $(NOITD_DTRACEOBJ)
178         @echo "- linking $@"
179         @$(CC) -o $@ $(NOIT_OBJS) \
180                 udns/libudns.o \
181                 $(NOITD_DTRACEOBJ) \
182                 $(LDFLAGS) \
183                 $(WHOLE_ARCHIVE) \
184                 -Leventer -leventer \
185                 utils/*.o \
186                 json-lib/*.o \
187                 -Ljlog -ljlog \
188                 -Lnoitedit -lnoitedit \
189                 $(NOWHOLE_ARCHIVE) \
190                 $(LIBS)
191
192 stratcond:      reversion $(STRATCON_OBJS) $(STRATCON_LIB_FILES) $(STRATCOND_DTRACEOBJ)
193         @echo "- linking $@"
194         @$(CC) -o $@ $(STRATCON_OBJS) \
195                 udns/libudns.o \
196                 $(STRATCOND_DTRACEOBJ) \
197                 $(LDFLAGS) \
198                 $(WHOLE_ARCHIVE) \
199                 -Leventer -leventer \
200                 utils/*.o \
201                 json-lib/*.o \
202                 -Ljlog -ljlog \
203                 -Lnoitedit -lnoitedit \
204                 $(NOWHOLE_ARCHIVE) \
205                 $(LIBS)
206
207 stratcon_datastore.o:   stratcon_datastore.c
208         @$(CC) $(CPPFLAGS) $(PGCFLAGS) $(CFLAGS) -c $<
209         @echo "- compiling $<"
210
211 .c.o:
212         @$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
213         @echo "- compiling $<"
214
215 noit_module.o:  module-online.h
216
217 module-online.h:        modules/module-online.xsl
218         @echo "- making module-online.h (StyleSheet include)"
219         @$(XML2H) helpStyleXML < modules/module-online.xsl > $@
220
221 noit_tokenizer.c:
222         @re2c -o $@ noit_tokenizer.re
223         @echo "- re2c noit_tokenizer.re"
224
225 test-noit.conf: noit.conf.in Makefile
226         @sed -e "s^%sysconfdir%^`pwd`^g;" \
227                 -e "s^%modulesdir%^`pwd`/modules^g;" \
228                 -e "s^%modulesluadir%^`pwd`/modules-lua^g;" \
229                 -e "s^%PKIPREFIX%^../test/test-^g;" < \
230                 noit.conf.in > \
231                 test-noit.conf
232
233 noit.conf:      noit.conf.in Makefile
234         @sed -e "s^%sysconfdir%^$(sysconfdir)^g;" \
235                 -e "s^%modulesdir%^$(MODULES_DIR)^g;" \
236                 -e "s^%modulesluadir%^$(MODULES_DIR)^g;" \
237                 -e "s^%PKIPREFIX%^$${PKIPREFIX}^g;" < \
238                 noit.conf.in > \
239                 noit.conf
240
241 test-stratcon.conf:     stratcon.conf.in Makefile
242         @sed -e "s^%sysconfdir%^`pwd`^g;" \
243                 -e "s^%modulesdir%^`pwd`/modules^g;" \
244                 -e "s^%modulesluadir%^`pwd`/modules-lua^g;" \
245                 -e "s^%iepbindir%^`pwd`/java^g;" \
246                 -e "s^%iepdbdir%^`pwd`/java^g;" \
247                 -e "s^%PKIPREFIX%^../test/test-^g;" < \
248                 stratcon.conf.in > \
249                 test-stratcon.conf
250
251 stratcon.conf:  stratcon.conf.in Makefile
252         @sed -e "s^%sysconfdir%^$(sysconfdir)^g;" \
253                 -e "s^%modulesdir%^$(MODULES_DIR)^g;" \
254                 -e "s^%modulesluadir%^$(MODULES_DIR)^g;" \
255                 -e "s^%iepbindir%^$(bindir)^g;" \
256                 -e "s^%iepdbdir%^$(localstatedir)/db/noit-iep^g;" \
257                 -e "s^%PKIPREFIX%^$${PKIPREFIX}^g;" < \
258                 stratcon.conf.in > \
259                 stratcon.conf
260
261 install-dirs:
262         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(bindir)
263         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(sbindir)
264         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(sysconfdir)
265
266 install-headers:        $(HEADERS)
267         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(bindir)
268         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)
269         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/eventer
270         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/utils
271         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/noitedit
272         $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(includedir)/jlog
273         $(INSTALL) -m 0755 scripts/noit-config $(DESTDIR)$(bindir)/noit-config
274         for file in $(HEADERS) ; do \
275                 $(INSTALL) -m 0644 $$file $(DESTDIR)$(includedir)/$$file ; \
276         done
277
278 install-noitd:  install-dirs noitd noit.conf java-bits jlog/jlogctl
279         $(INSTALL) -m 0755 scripts/noittrap $(DESTDIR)$(bindir)/noittrap
280         $(INSTALL) -m 0755 jlog/jlogctl $(DESTDIR)$(bindir)/noit_jlogctl
281         $(INSTALL) -m 0755 noitd $(DESTDIR)$(sbindir)/noitd
282         $(INSTALL) -m 0644 noit.conf $(DESTDIR)$(sysconfdir)/noit.conf.sample
283         $(INSTALL) -m 0644 config_templates.conf $(DESTDIR)$(sysconfdir)/config_templates.conf
284         $(INSTALL) -m 0644 default-ca-chain.crt $(DESTDIR)$(sysconfdir)/default-ca-chain.crt
285         (cd modules && $(MAKE) install-modules DESTDIR=$(DESTDIR))
286         (cd modules-lua && $(MAKE) install DESTDIR=$(DESTDIR))
287         -test -n "@JAVAPARTS@" && (cd @JAVAPARTS@ && $(MAKE) install-jezebel DESTDIR=$(DESTDIR))
288
289 install-stratcond:      install-dirs stratcond stratcon.conf java-bits
290         $(INSTALL) -m 0755 stratcond $(DESTDIR)$(sbindir)/stratcond
291         $(INSTALL) -m 0644 stratcon.conf $(DESTDIR)$(sysconfdir)/stratcon.conf.sample
292         (cd modules && $(MAKE) install-smodules DESTDIR=$(DESTDIR))
293         -test -n "@JAVAPARTS@" && (cd @JAVAPARTS@ && $(MAKE) install-iep DESTDIR=$(DESTDIR))
294
295 install-docs:
296         (cd man && $(MAKE) install DESTDIR=$(DESTDIR))
297
298 install:        install-dirs install-docs install-headers install-noitd install-stratcond
299
300 clean:
301         rm -f *.o $(TARGETS)
302         rm -f module-online.h
303         (cd jlog && $(MAKE) clean)
304         (cd eventer && $(MAKE) clean)
305         (cd udns && $(MAKE) clean)
306         (cd man && $(MAKE) clean)
307         (cd modules && $(MAKE) clean)
308         (cd noitedit && $(MAKE) clean)
309         (cd utils && $(MAKE) clean)
310         (cd json-lib && $(MAKE) clean)
311         (cd lua && $(MAKE) clean)
312         (cd java && $(MAKE) clean)
313
314 Makefile.dep:
315         $(CC) -I. $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) *.c > Makefile.dep
316         $(top_srcdir)/buildtools/culldeps.sh Makefile.dep
317
318 include Makefile.dep
319
320 distclean-subdirs:
321         for dir in jlog eventer udns man modules modules-lua noitedit utils json-lib lua java ; do \
322                 (cd $$dir && $(MAKE) distclean) ; \
323         done
324
325 distclean:      clean distclean-subdirs
326         rm -f Makefile noit_config.h scripts/noit-config
327
Note: See TracBrowser for help on using the browser.