root/src/Makefile.in

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

use $(MAKE) instead of make in Makefile

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