root/src/Makefile.in

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

remove the re2c auto build...

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