1 # This file is the basis of the main makefile for Exim and friends. The
2 # makefile at the top level arranges to build the main makefile by calling
3 # scripts/Configure-Makefile from within the build directory. This
4 # concatenates the configuration settings from Local/Makefile and other,
5 # optional, Local/* files at the front of this file, to create Makefile in the
8 # Copyright (c) The Exim Maintainers 1995 - 2022
9 # SPDX-License-Identifier: GPL-2.0-or-later
14 EDITME = ../Local/Makefile
15 EXIMON_EDITME = ../Local/eximon.conf
17 # The compiler used for linking is normally the same as the compiler used for
18 # compiling. However, by giving it a different name, we can override it from
19 # the command line, and this is helpful for certain types of testing.
23 # The compile commands can be very long. To make the output look better,
24 # they are not normally echoed in full. To get full echoing, the caller
25 # must set FULLECHO='' on the command line and call make with -e. We default
26 # FULLECHO to '@' to suppress the full echo. Then define an abbreviation.
31 # The default target double-checks the existence of $(EDITME) and then arranges
32 # to touch it if it exists and any of the optional configuration files, which
33 # depend on the os or the architecture, have been altered. The same sub-target
34 # does the same thing for the eximon configuration file if it exists. Then
35 # there is a check that the Makefile (the one built from this file) is
36 # up-to-date. Then the os-specific source files and the C configuration file
37 # are set up, and finally it goes to the main Exim target.
40 config: $(EDITME) checklocalmake Makefile os.c config.h version.h version.sh macro.c
43 @if $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE) $(EDITME) || \
44 $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(ARCHTYPE) $(EDITME) || \
45 $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE)-$(ARCHTYPE) $(EDITME); \
49 @if $(SHELL) $(SCRIPTS)/newer $(EXIMON_EDITME)-$(OSTYPE) $(EXIMON_EDITME) || \
50 $(SHELL) $(SCRIPTS)/newer $(EXIMON_EDITME)-$(ARCHTYPE) $(EXIMON_EDITME) || \
51 $(SHELL) $(SCRIPTS)/newer $(EXIMON_EDITME)-$(OSTYPE)-$(ARCHTYPE) $(EXIMON_EDITME); \
53 if [ -f $(EXIMON_EDITME) ]; then touch $(EXIMON_EDITME); fi \
58 @echo "*** Please create Local/Makefile by copying src/EDITME and making"
59 @echo "*** appropriate changes for your site."
65 @echo "*** Please create Local/eximon.conf by copying exim_monitor/EDITME and making"
66 @echo "*** appropriate changes for your site."
68 @test ! -d ../Local && mkdir ../Local
71 # Check that the local Makefile is up-to-date
73 Makefile: ../OS/Makefile-Base ../OS/Makefile-Default \
74 $(SCRIPTS)/Configure $(SCRIPTS)/Configure-Makefile $(EDITME)
76 @echo "*** Makefile needs rebuilding"
77 @echo "*** Please run \"make makefile\" at top level"
81 # Build (link) the os.h file
83 os.h: $(SCRIPTS)/Configure-os.h \
89 $(SHELL) $(SCRIPTS)/Configure-os.h
94 $(SCRIPTS)/Configure-os.c \
99 $(SHELL) $(SCRIPTS)/Configure-os.c
101 # Build the config.h file.
103 config.h: Makefile buildconfig ../src/config.h.defaults $(EDITME)
104 $(SHELL) $(SCRIPTS)/Configure-config.h "$(MAKE)"
106 # Build the builtin-macros data struct
108 MACRO_HSRC = macro_predef.h os.h globals.h config.h macros.h \
109 routers/accept.h routers/dnslookup.h routers/ipliteral.h \
110 routers/iplookup.h routers/manualroute.h routers/queryprogram.h \
113 OBJ_MACRO = macro_predef.o \
114 macro-globals.o macro-readconf.o macro-expand.o macro-route.o \
115 macro-transport.o macro-drtables.o macro-acl.o macro-tls.o \
116 macro-appendfile.o macro-autoreply.o macro-lmtp.o macro-pipe.o macro-queuefile.o \
117 macro-smtp.o macro-accept.o macro-dnslookup.o macro-ipliteral.o macro-iplookup.o \
118 macro-manualroute.o macro-queryprogram.o macro-redirect.o \
119 macro-auth-spa.o macro-cram_md5.o macro-cyrus_sasl.o macro-dovecot.o macro-gsasl_exim.o \
120 macro-heimdal_gssapi.o macro-plaintext.o macro-spa.o macro-authtls.o macro-external.o \
121 macro-dkim.o macro-malware.o macro-signing.o
123 $(OBJ_MACRO): $(MACRO_HSRC)
125 macro_predef.o : macro_predef.c
126 @echo "$(CC) -DMACRO_PREDEF macro_predef.c"
127 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ macro_predef.c
128 macro-globals.o : globals.c
129 @echo "$(CC) -DMACRO_PREDEF globals.c"
130 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ globals.c
131 macro-readconf.o : readconf.c
132 @echo "$(CC) -DMACRO_PREDEF readconf.c"
133 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ readconf.c
134 macro-expand.o : expand.c
135 @echo "$(CC) -DMACRO_PREDEF expand.c"
136 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ expand.c
137 macro-route.o : route.c
138 @echo "$(CC) -DMACRO_PREDEF route.c"
139 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ route.c
140 macro-transport.o: transport.c
141 @echo "$(CC) -DMACRO_PREDEF transport.c"
142 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transport.c
143 macro-drtables.o : drtables.c
144 @echo "$(CC) -DMACRO_PREDEF drtables.c"
145 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ drtables.c
147 @echo "$(CC) -DMACRO_PREDEF acl.c"
148 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ acl.c
149 macro-tls.o: tls.c tls-gnu.c tls-openssl.c
150 @echo "$(CC) -DMACRO_PREDEF tls.c"
151 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ tls.c
152 macro-appendfile.o : transports/appendfile.c
153 @echo "$(CC) -DMACRO_PREDEF transports/appendfile.c"
154 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/appendfile.c
155 macro-autoreply.o : transports/autoreply.c
156 @echo "$(CC) -DMACRO_PREDEF transports/autoreply.c"
157 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/autoreply.c
158 macro-lmtp.o: transports/lmtp.c
159 @echo "$(CC) -DMACRO_PREDEF transports/lmtp.c"
160 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/lmtp.c
161 macro-pipe.o : transports/pipe.c
162 @echo "$(CC) -DMACRO_PREDEF transports/pipe.c"
163 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/pipe.c
164 macro-queuefile.o : transports/queuefile.c
165 @echo "$(CC) -DMACRO_PREDEF transports/queuefile.c"
166 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/queuefile.c
167 macro-smtp.o : transports/smtp.c
168 @echo "$(CC) -DMACRO_PREDEF transports/smtp.c"
169 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/smtp.c
170 macro-accept.o : routers/accept.c
171 @echo "$(CC) -DMACRO_PREDEF routers/accept.c"
172 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/accept.c
173 macro-dnslookup.o : routers/dnslookup.c
174 @echo "$(CC) -DMACRO_PREDEF routers/dnslookup.c"
175 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/dnslookup.c
176 macro-ipliteral.o : routers/ipliteral.c
177 @echo "$(CC) -DMACRO_PREDEF routers/ipliteral.c"
178 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/ipliteral.c
179 macro-iplookup.o : routers/iplookup.c
180 @echo "$(CC) -DMACRO_PREDEF routers/iplookup.c"
181 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/iplookup.c
182 macro-manualroute.o : routers/manualroute.c
183 @echo "$(CC) -DMACRO_PREDEF routers/manualroute.c"
184 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/manualroute.c
185 macro-queryprogram.o : routers/queryprogram.c
186 @echo "$(CC) -DMACRO_PREDEF routers/queryprogram.c"
187 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/queryprogram.c
188 macro-redirect.o : routers/redirect.c
189 @echo "$(CC) -DMACRO_PREDEF routers/redirect.c"
190 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/redirect.c
191 macro-auth-spa.o : auths/auth-spa.c
192 @echo "$(CC) -DMACRO_PREDEF auths/auth-spa.c"
193 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/auth-spa.c
194 macro-cram_md5.o : auths/cram_md5.c
195 @echo "$(CC) -DMACRO_PREDEF auths/cram_md5.c"
196 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/cram_md5.c
197 macro-cyrus_sasl.o : auths/cyrus_sasl.c
198 @echo "$(CC) -DMACRO_PREDEF auths/cyrus_sasl.c"
199 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/cyrus_sasl.c
200 macro-dovecot.o: auths/dovecot.c
201 @echo "$(CC) -DMACRO_PREDEF auths/dovecot.c"
202 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/dovecot.c
203 macro-external.o: auths/external.c
204 @echo "$(CC) -DMACRO_PREDEF auths/external.c"
205 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/external.c
206 macro-gsasl_exim.o : auths/gsasl_exim.c
207 @echo "$(CC) -DMACRO_PREDEF auths/gsasl_exim.c"
208 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/gsasl_exim.c
209 macro-heimdal_gssapi.o: auths/heimdal_gssapi.c
210 @echo "$(CC) -DMACRO_PREDEF auths/heimdal_gssapi.c"
211 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/heimdal_gssapi.c
212 macro-plaintext.o : auths/plaintext.c
213 @echo "$(CC) -DMACRO_PREDEF auths/plaintext.c"
214 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/plaintext.c
215 macro-spa.o : auths/spa.c
216 @echo "$(CC) -DMACRO_PREDEF auths/spa.c"
217 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/spa.c
218 macro-authtls.o: auths/tls.c
219 @echo "$(CC) -DMACRO_PREDEF auths/tls.c"
220 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/tls.c
222 @echo "$(CC) -DMACRO_PREDEF dkim.c"
223 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ dkim.c
224 macro-malware.o: malware.c
225 @echo "$(CC) -DMACRO_PREDEF malware.c"
226 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ malware.c
227 macro-signing.o: pdkim/signing.c
228 @echo "$(CC) -DMACRO_PREDEF pdkim/signing.c"
229 $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ pdkim/signing.c
231 macro_predef: $(OBJ_MACRO)
232 @echo "$(LNCC) -o $@"
233 $(FE)$(LNCC) -o $@ $(LFLAGS) $(OBJ_MACRO)
235 macro.c: macro_predef
236 ./macro_predef > macro.c
238 # This target is recognized specially by GNU make. It records those targets
239 # that do not correspond to files that are being built and which should
240 # therefore always be run, even if the files exist. This shouldn't in fact be a
241 # problem, but it does no harm. Other make programs will just ignore this.
243 .PHONY: all config utils \
244 buildauths buildlookups buildpdkim buildrouters \
245 buildtransports checklocalmake clean
248 utils: $(EXIM_MONITOR) exicyclog exinext exiwhat \
249 exigrep eximstats exipick exiqgrep exiqsumm \
250 transport-filter.pl convert4r3 convert4r4 \
252 exim_dbmbuild exim_dumpdb exim_fixdb exim_tidydb exim_lock \
256 # Targets for special-purpose configuration header builders
257 buildconfig: buildconfig.c
258 @echo "$(CC) buildconfig.c"
259 $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
262 # Target for the exicyclog utility script
263 exicyclog: config ../src/exicyclog.src
265 @. ./version.sh && sed \
266 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
269 -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \
270 -e "s?CONFIGURE_FILE_USE_EUID?$(CONFIGURE_FILE_USE_EUID)?" \
271 -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \
272 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
273 -e "s?EXICYCLOG_MAX?$(EXICYCLOG_MAX)?" \
274 -e "s?COMPRESS_COMMAND?$(COMPRESS_COMMAND)?" \
275 -e "s?COMPRESS_SUFFIX?$(COMPRESS_SUFFIX)?" \
276 -e "s?CHGRP_COMMAND?$(CHGRP_COMMAND)?" \
277 -e "s?CHMOD_COMMAND?$(CHMOD_COMMAND)?" \
278 -e "s?CHOWN_COMMAND?$(CHOWN_COMMAND)?" \
279 -e "s?MV_COMMAND?$(MV_COMMAND)?" \
280 -e "s?RM_COMMAND?$(RM_COMMAND)?" \
281 -e "s?TOUCH_COMMAND?$(TOUCH_COMMAND)?" \
282 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
283 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
284 ../src/exicyclog.src > exicyclog-t
285 @mv exicyclog-t exicyclog
287 @echo ">>> exicyclog script built"
289 # Target for the exinext utility script
290 exinext: config ../src/exinext.src
292 @. ./version.sh && sed \
293 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
296 -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \
297 -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \
298 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
299 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
300 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
301 ../src/exinext.src > exinext-t
302 @mv exinext-t exinext
304 @echo ">>> exinext script built"
306 # Target for the exiwhat utility script
307 exiwhat: config ../src/exiwhat.src
309 @. ./version.sh && sed \
310 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
313 -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \
314 -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \
315 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
316 -e "s?EXIWHAT_PS_CMD?$(EXIWHAT_PS_CMD)?" \
317 -e "s?EXIWHAT_PS_ARG?$(EXIWHAT_PS_ARG)?" \
318 -e "s?EXIWHAT_KILL_SIGNAL?$(EXIWHAT_KILL_SIGNAL)?" \
319 -e "s?EXIWHAT_EGREP_ARG?$(EXIWHAT_EGREP_ARG)?" \
320 -e "s?EXIWHAT_MULTIKILL_CMD?$(EXIWHAT_MULTIKILL_CMD)?" \
321 -e "s?EXIWHAT_MULTIKILL_ARG?$(EXIWHAT_MULTIKILL_ARG)?" \
322 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
323 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
324 -e "s?RM_COMMAND?$(RM_COMMAND)?" \
325 ../src/exiwhat.src > exiwhat-t
326 @mv exiwhat-t exiwhat
328 @echo ">>> exiwhat script built"
330 # Target for the exim_checkaccess utility script
331 exim_checkaccess: config ../src/exim_checkaccess.src
332 @rm -f exim_checkaccess
333 @. ./version.sh && sed \
334 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
337 -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \
338 -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \
339 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
340 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
341 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
342 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
343 ../src/exim_checkaccess.src > exim_checkaccess-t
344 @mv exim_checkaccess-t exim_checkaccess
345 @chmod a+x exim_checkaccess
346 @echo ">>> exim_checkaccess script built"; echo ""
348 # Target for the Exim monitor start-up script
349 eximon: config ../src/eximon.src ../OS/eximon.conf-Default \
352 $(SHELL) $(SCRIPTS)/Configure-eximon
353 @. ./version.sh && sed \
354 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
357 -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \
358 -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \
359 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
360 -e "s?BASENAME_COMMAND?$(BASENAME_COMMAND)?" \
361 -e "s?HOSTNAME_COMMAND?$(HOSTNAME_COMMAND)?" \
362 -e "s?X11_LD_LIBRARY?$(X11_LD_LIB)?" \
363 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
364 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
365 ../src/eximon.src >> eximon
366 @echo ">>> eximon script built"; echo ""
368 # Targets for utilities; these are all Perl scripts that have to get the
369 # location of Perl put in them. A few need other things as well.
371 exigrep: config ../src/exigrep.src
373 @. ./version.sh && sed \
374 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
377 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
378 -e "s?ZCAT_COMMAND?$(ZCAT_COMMAND)?" \
379 -e "s?COMPRESS_SUFFIX?$(COMPRESS_SUFFIX)?" \
380 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
381 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
382 ../src/exigrep.src > exigrep-t
383 @mv exigrep-t exigrep
385 @echo ">>> exigrep script built"
387 exim_msgdate: config ../src/exim_msgdate.src
389 @. ./version.sh && sed \
390 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
393 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
394 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
395 -e "s?BASE_62?$${BASE_62:-62}?" \
396 -e "s?CONFIGURE_FILE\"?$(CONFIGURE_FILE)\"?" \
397 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
398 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
399 ../src/exim_msgdate.src > exim_msgdate-t
400 @mv exim_msgdate-t exim_msgdate
401 @chmod a+x exim_msgdate
402 @echo ">>> exim_msgdate script built"
404 eximstats: config ../src/eximstats.src
406 @. ./version.sh && sed \
407 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
408 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
409 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
410 ../src/eximstats.src > eximstats-t
411 @mv eximstats-t eximstats
413 @echo ">>> eximstats script built"
415 exiqgrep: config ../src/exiqgrep.src
417 @. ./version.sh && sed \
418 -e "s?PROCESSED_FLAG?This file has been so processed.?"\
421 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
422 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
423 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
424 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
425 ../src/exiqgrep.src > exiqgrep-t
426 @mv exiqgrep-t exiqgrep
428 @echo ">>> exiqgrep script built"
430 exiqsumm: config ../src/exiqsumm.src
432 @. ./version.sh && sed \
433 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
434 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
435 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
436 ../src/exiqsumm.src > exiqsumm-t
437 @mv exiqsumm-t exiqsumm
439 @echo ">>> exiqsumm script built"
441 exipick: config ../src/exipick.src
443 @. ./version.sh && sed \
444 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
445 -e "s?SPOOL_DIRECTORY?$(SPOOL_DIRECTORY)?" \
446 -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
447 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
448 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
449 ../src/exipick.src > exipick-t
450 @mv exipick-t exipick
452 @echo ">>> exipick script built"
454 transport-filter.pl: config ../src/transport-filter.src
455 @rm -f transport-filter.pl
456 @. ./version.sh && sed \
457 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
458 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
459 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
460 ../src/transport-filter.src > transport-filter.pl-t
461 @mv transport-filter.pl-t transport-filter.pl
462 @chmod a+x transport-filter.pl
463 @echo ">>> transport-filter.pl script built"
465 convert4r3: config ../src/convert4r3.src
467 @. ./version.sh && sed \
468 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
469 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
470 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
471 ../src/convert4r3.src > convert4r3-t
472 @mv convert4r3-t convert4r3
473 @chmod a+x convert4r3
474 @echo ">>> convert4r3 script built"
476 convert4r4: config ../src/convert4r4.src
478 @. ./version.sh && sed \
479 -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
480 -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
481 -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
482 ../src/convert4r4.src > convert4r4-t
483 @mv convert4r4-t convert4r4
484 @chmod a+x convert4r4
485 @echo ">>> convert4r4 script built"
488 # These are objects of optional features. They are always compiled, but
489 # if the corresponding #defines are not set, they wind up empty and
490 # are thrown away by the linker.
492 OBJ_WITH_CONTENT_SCAN = malware.o mime.o regex.o spam.o spool_mbox.o
493 OBJ_EXPERIMENTAL = arc.o \
502 # Targets for final binaries; the main one has a build number which is
503 # updated each time. We don't bother with that for the auxiliaries.
505 OBJ_LOOKUPS = lookups/lf_quote.o lookups/lf_check_file.o lookups/lf_sqlperform.o
507 OBJ_EXIM = acl.o base64.o child.o crypt16.o daemon.o dbfn.o debug.o deliver.o \
508 directory.o dns.o drtables.o enq.o exim.o expand.o filter.o \
509 filtertest.o globals.o dkim.o dkim_transport.o dnsbl.o hash.o \
510 header.o host.o host_address.o ip.o log.o lss.o match.o md5.o moan.o \
511 os.o parse.o priv.o queue.o \
512 rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o regex_cache.o \
513 route.o search.o sieve.o smtp_in.o smtp_out.o spool_in.o spool_out.o \
514 std-crypto.o store.o string.o tls.o tod.o transport.o tree.o verify.o \
515 environment.o macro.o \
517 local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN) \
520 exim: buildlookups buildauths pdkim/pdkim.a \
521 buildrouters buildtransports \
522 $(OBJ_EXIM) version.o
523 @echo "$(LNCC) -o exim"
524 $(FE)$(PURIFY) $(LNCC) -o exim $(LFLAGS) $(OBJ_EXIM) version.o \
525 routers/routers.a transports/transports.a lookups/lookups.a \
526 auths/auths.a pdkim/pdkim.a \
527 $(LIBRESOLV) $(LIBS) $(LIBS_EXIM) $(IPV6_LIBS) $(EXTRALIBS) \
528 $(EXTRALIBS_EXIM) $(DBMLIB) $(LOOKUP_LIBS) $(AUTH_LIBS) \
529 $(PERL_LIBS) $(TLS_LIBS) $(PCRE_LIBS) $(LDFLAGS)
530 @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
531 echo $(STRIP_COMMAND) exim; \
532 $(STRIP_COMMAND) exim; \
536 @echo ">>> exim binary built"
539 # The utility for dumping the contents of an exim database
541 OBJ_DUMPDB = exim_dumpdb.o util-os.o util-store.o
543 exim_dumpdb: $(OBJ_DUMPDB)
544 @echo "$(LNCC) -o exim_dumpdb"
545 $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dumpdb $(LFLAGS) $(OBJ_DUMPDB) \
546 $(LIBS) $(EXTRALIBS) $(DBMLIB)
547 @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
548 echo $(STRIP_COMMAND) exim_dumpdb; \
549 $(STRIP_COMMAND) exim_dumpdb; \
551 @echo ">>> exim_dumpdb utility built"
554 # The utility for interrogating/fixing the contents of an exim database
556 OBJ_FIXDB = exim_fixdb.o util-os.o util-store.o util-md5.o
558 exim_fixdb: $(OBJ_FIXDB)
559 @echo "$(LNCC) -o exim_fixdb"
560 $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_fixdb $(LFLAGS) $(OBJ_FIXDB) \
561 $(LIBS) $(EXTRALIBS) $(DBMLIB)
562 @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
563 echo $(STRIP_COMMAND) exim_fixdb; \
564 $(STRIP_COMMAND) exim_fixdb; \
566 @echo ">>> exim_fixdb utility built"
569 # The utility for tidying the contents of an exim database
571 OBJ_TIDYDB = exim_tidydb.o util-os.o util-store.o
573 exim_tidydb: $(OBJ_TIDYDB)
574 @echo "$(LNCC) -o exim_tidydb"
575 $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_tidydb $(LFLAGS) $(OBJ_TIDYDB) \
576 $(LIBS) $(EXTRALIBS) $(DBMLIB)
577 @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
578 echo $(STRIP_COMMAND) exim_tidydb; \
579 $(STRIP_COMMAND) exim_tidydb; \
581 @echo ">>> exim_tidydb utility built"
584 # The utility for building dbm files
586 exim_dbmbuild: exim_dbmbuild.o
587 @echo "$(LNCC) -o exim_dbmbuild"
588 $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dbmbuild $(LFLAGS) exim_dbmbuild.o \
589 $(LIBS) $(EXTRALIBS) $(DBMLIB)
590 @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
591 echo $(STRIP_COMMAND) exim_dbmbuild; \
592 $(STRIP_COMMAND) exim_dbmbuild; \
594 @echo ">>> exim_dbmbuild utility built"
597 # The utility for locking a mailbox while messing around with it
599 exim_lock: exim_lock.c os.h
600 @echo "$(CC) exim_lock.c"
601 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) exim_lock.c
602 @echo "$(LNCC) -o exim_lock"
603 $(FE)$(LNCC) -o exim_lock $(LFLAGS) exim_lock.o \
605 @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
606 echo $(STRIP_COMMAND) exim_lock; \
607 $(STRIP_COMMAND) exim_lock; \
609 @echo ">>> exim_lock utility built"
612 # The X-based Exim monitor program's binary part. There's a macro for cutting
613 # out the modified TextPop module, because some antique link editors cannot
614 # handle the fact that it is redefining things that are found later in the
617 # Object modules that are the unique Eximon modules
619 MONBIN = em_StripChart.o $(EXIMON_TEXTPOP) em_globals.o em_init.o \
620 em_log.o em_main.o em_menu.o em_queue.o em_strip.o \
623 # The complete modules list also includes some specially compiled versions of
624 # code from the main Exim source tree.
626 OBJ_MONBIN = util-host_address.o \
635 eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) ../exim_monitor/em_version.c \
636 mytypes.h store.h macros.h
637 @echo "$(CC) exim_monitor/em_version.c"
638 $(FE)$(CC) -o em_version.o -c \
639 $(CFLAGS) $(XINCLUDE) -I. ../exim_monitor/em_version.c
640 @echo "$(LNCC) -o eximon.bin"
641 $(FE)$(PURIFY) $(LNCC) -o eximon.bin em_version.o $(LFLAGS) $(XLFLAGS) \
642 $(OBJ_MONBIN) -lXaw -lXmu -lXt -lXext -lX11 $(PCRE_LIBS) \
643 $(LIBS) $(LIBS_EXIMON) $(EXTRALIBS) $(EXTRALIBS_EXIMON) -lc
644 @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
645 echo $(STRIP_COMMAND) eximon.bin; \
646 $(STRIP_COMMAND) eximon.bin; \
648 @echo ">>> exim monitor binary built"
652 # Compile step for most of the exim modules. HDRS is a list of headers
653 # which cause everything to be rebuilt. PHDRS is the same, for the use
654 # of routers, transports, and authenticators. I can't find a way of doing this
655 # in one. This list is overkill, but it doesn't really take much time to
656 # rebuild Exim on a modern computer.
673 PHDRS = ../config.h \
679 ../hintsdb_structs.h \
687 .c.o:; @echo "$(CC) $*.c"
688 $(FE)$(CC) -c $(CFLAGS) -I. $(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $*.c
690 # Update Exim's version information and build the version object. The dependency
691 # chain here avoids problems under parallel-make.
694 @../scripts/reversion
696 version.h: version.sh
700 version.o: $(HDRS) cnumber.h version.h version.c
702 # This is the dummy module for use by test compiles of individual modules. It
703 # contains functions such as log_write() that may be called from bits of Exim
704 # in the tested code.
708 # Compile instructions for perl.o for when EXIM_PERL is set
710 perl.o: $(HDRS) perl.c
711 @echo "$(PERL_CC) perl.c"
712 $(FE)$(PERL_CC) $(PERL_CCOPTS) $(CFLAGS) $(INCLUDE) -c perl.c
714 # Compile instructions for the database utility modules
716 exim_dumpdb.o: $(HDRS) exim_dbutil.c
717 @echo "$(CC) -DEXIM_DUMPDB exim_dbutil.c"
718 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \
721 -o exim_dumpdb.o exim_dbutil.c
723 exim_fixdb.o: $(HDRS) exim_dbutil.c
724 @echo "$(CC) -DEXIM_FIXDB exim_dbutil.c"
725 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \
728 -o exim_fixdb.o exim_dbutil.c
730 exim_tidydb.o: $(HDRS) exim_dbutil.c
731 @echo "$(CC) -DEXIM_TIDYDB exim_dbutil.c"
732 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \
735 -o exim_tidydb.o exim_dbutil.c
737 # Compile instructions for exim_dbmbuild
739 exim_dbmbuild.o: $(HDRS) exim_dbmbuild.c
740 @echo "$(CC) exim_dbmbuild.c"
741 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY \
742 -o exim_dbmbuild.o exim_dbmbuild.c
744 # Utilities use special versions of some modules - typically with debugging
747 util-host_address.o: $(HDRS) host_address.c
748 @echo "$(CC) -DCOMPILE_UTILITY host_address.c"
749 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-host_address.o host_address.c
751 util-md5.o: $(HDRS) md5.c
752 @echo "$(CC) -DCOMPILE_UTILITY queue.c"
753 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-md5.o md5.c
755 util-spool_in.o: $(HDRS) spool_in.c
756 @echo "$(CC) -DCOMPILE_UTILITY spool_in.c"
757 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-spool_in.o spool_in.c
759 util-store.o: $(HDRS) store.c
760 @echo "$(CC) -DCOMPILE_UTILITY store.c"
761 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-store.o store.c
763 util-string.o: $(HDRS) string.c
764 @echo "$(CC) -DCOMPILE_UTILITY string.c"
765 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-string.o string.c
767 util-queue.o: $(HDRS) queue.c
768 @echo "$(CC) -DCOMPILE_UTILITY queue.c"
769 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-queue.o queue.c
771 util-tod.o: $(HDRS) tod.c
772 @echo "$(CC) -DCOMPILE_UTILITY tod.c"
773 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-tod.o tod.c
775 util-tree.o: $(HDRS) tree.c
776 @echo "$(CC) -DCOMPILE_UTILITY tree.c"
777 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-tree.o tree.c
779 util-os.o: $(HDRS) os.c
780 @echo "$(CC) -DCOMPILE_UTILITY os.c"
781 $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \
784 -DFIND_RUNNING_INTERFACES \
787 # The local scan module depends only on its own special header, and is compiled
788 # from a source whose location is set by configuration.
790 local_scan.o: config local_scan.h ../$(LOCAL_SCAN_SOURCE)
791 @echo "$(CC) local_scan.c"
792 $(FE)$(CC) -DLOCAL_SCAN -c $(CFLAGS) -I. $(INCLUDE) -o local_scan.o ../$(LOCAL_SCAN_SOURCE)
794 # Dependencies for the "ordinary" exim modules
797 base64.o: $(HDRS) mime.h base64.c
798 child.o: $(HDRS) child.c
799 crypt16.o: $(HDRS) crypt16.c
800 daemon.o: $(HDRS) daemon.c
801 dbfn.o: $(HDRS) dbfn.c
802 debug.o: $(HDRS) debug.c
803 deliver.o: $(HDRS) transports/smtp.h deliver.c
804 directory.o: $(HDRS) directory.c
806 dnsbl.o: $(HDRS) dnsbl.c
808 exim.o: $(HDRS) exim.c
809 expand.o: $(HDRS) expand.c
810 environment.o: $(HDRS) environment.c
811 filter.o: $(HDRS) filter.c
812 filtertest.o: $(HDRS) filtertest.c
813 globals.o: $(HDRS) globals.c
814 hash.o: $(HDRS) hash.c
815 header.o: $(HDRS) header.c
816 host.o: $(HDRS) host.c
817 host_address.o: $(HDRS) host_address.c
821 match.o: $(HDRS) match.c
823 moan.o: $(HDRS) moan.c
824 os.o: $(HDRS) $(OS_C_INCLUDES) os.c
825 parse.o: $(HDRS) parse.c
826 priv.o: $(HDRS) priv.c
827 queue.o: $(HDRS) queue.c
829 readconf.o: $(HDRS) readconf.c
830 receive.o: $(HDRS) receive.c
831 retry.o: $(HDRS) retry.c
832 rewrite.o: $(HDRS) rewrite.c
833 regex_cache.o: $(HDRS) regex_cache.c
834 rfc2047.o: $(HDRS) rfc2047.c
835 route.o: $(HDRS) route.c
836 search.o: $(HDRS) search.c
837 sieve.o: $(HDRS) sieve.c
838 smtp_in.o: $(HDRS) smtp_in.c
839 smtp_out.o: $(HDRS) smtp_out.c
840 spool_in.o: $(HDRS) spool_in.c
841 spool_out.o: $(HDRS) spool_out.c
842 std-crypto.o: $(HDRS) std-crypto.c
843 store.o: $(HDRS) store.c
844 string.o: $(HDRS) string.c
845 tls.o: $(HDRS) tls.c \
846 tls-gnu.c tlscert-gnu.c \
847 tls-openssl.c tlscert-openssl.c \
850 transport.o: $(HDRS) transport.c
851 tree.o: $(HDRS) tree.c
852 verify.o: $(HDRS) transports/smtp.h verify.c
853 dkim.o: $(HDRS) pdkim/pdkim.h dkim.c
854 dkim_transport.o: $(HDRS) dkim_transport.c
856 # Dependencies for WITH_CONTENT_SCAN modules
858 malware.o: $(HDRS) malware.c
859 mime.o: $(HDRS) mime.h mime.c
860 regex.o: $(HDRS) regex.c
861 spam.o: $(HDRS) spam.c
862 spool_mbox.o: $(HDRS) spool_mbox.c
865 # Dependencies for EXPERIMENTAL_* modules
867 arc.o: $(HDRS) pdkim/pdkim.h arc.c
868 bmi_spam.o: $(HDRS) bmi_spam.c
869 dane.o: $(HDRS) dane.c dane-openssl.c
870 dcc.o: $(HDRS) dcc.h dcc.c
871 dmarc.o: $(HDRS) pdkim/pdkim.h dmarc.h dmarc.c
872 imap_utf7.o: $(HDRS) imap_utf7.c
873 spf.o: $(HDRS) spf.h spf.c
874 utf8.o: $(HDRS) utf8.c
876 # The module containing tables of available lookups, routers, auths, and
877 # transports must be rebuilt if any of them are. However, because the makefiles
878 # for the drivers are always run, we don't actually put the dependencies here,
879 # because if we do, some version of "make" (e.g. IRIX) insist on rebuilding
880 # drtables.o even though the .a files haven't in fact been updated. Instead
881 # it is arranged that the lower-level makefiles remove drtables.o when they
882 # rebuild the .a files.
884 drtables.o: $(HDRS) drtables.c
886 # We depend upon object files built as part of building the lookups library
887 # When using parallel make, we don't have the dependency to force building
888 # in the sub-directory unless we force that dependency:
890 $(OBJ_LOOKUPS): buildlookups
892 # The exim monitor's private modules - the sources live in a private
893 # subdirectory. The final binary combines the private modules with some
894 # modules from the main exim binary.
896 em_StripChart.o: ../exim_monitor/em_StripChart.c
897 em_TextPop.o: ../exim_monitor/em_TextPop.c
898 em_globals.o: ../exim_monitor/em_globals.c ../exim_monitor/em_hdr.h
899 em_init.o: ../exim_monitor/em_init.c ../exim_monitor/em_hdr.h
900 em_log.o: ../exim_monitor/em_log.c ../exim_monitor/em_hdr.h
901 em_main.o: ../exim_monitor/em_main.c ../exim_monitor/em_hdr.h
902 em_menu.o: ../exim_monitor/em_menu.c ../exim_monitor/em_hdr.h
903 em_queue.o: ../exim_monitor/em_queue.c ../exim_monitor/em_hdr.h
904 em_strip.o: ../exim_monitor/em_strip.c ../exim_monitor/em_hdr.h
905 em_text.o: ../exim_monitor/em_text.c ../exim_monitor/em_hdr.h
906 em_xs.o: ../exim_monitor/em_xs.c ../exim_monitor/em_hdr.h
907 em_version.o: ../exim_monitor/em_version.c ../exim_monitor/em_hdr.h
909 @echo "$(CC) exim_monitor/$(@:.o=.c)"
910 $(FE)$(CC) -o $@ -c $(CFLAGS) -DCOMPILE_UTILITY -I. -I../exim_monitor $(INCLUDE) $(XINCLUDE) \
911 ../exim_monitor/$(@:.o=.c)
914 # Targets for the various libraries that Exim uses.
916 # The lookups library.
919 @cd lookups && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
920 CFLAGS_DYNAMIC="$(CFLAGS_DYNAMIC)" HDRS="../version.h $(PHDRS)" \
921 FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" \
922 INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $(LOOKUP_INCLUDE)"
925 # The routers library.
928 @cd routers && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
929 FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
930 INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"
933 # The transports library.
935 buildtransports: config
936 @cd transports && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
937 FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
938 INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"
941 # The library of authorization modules
944 @cd auths && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
945 FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
946 INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"
951 buildpdkim: pdkim/pdkim.a
952 pdkim/pdkim.a: config
953 @cd pdkim && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
954 FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
955 INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"
958 # The "clean", "install", and "makefile" targets just pass themselves back to
959 # the main Exim makefile. These targets will be obeyed only if "make" is obeyed
960 # for them in the build directory.
962 clean install makefile:; cd ..; $(MAKE) $(MFLAGS) build=$(build) $@
964 # Targets for building stand-alone testing programs for basic testing of
965 # some of the building blocks. These are not integrated with the makefile-
966 # building targets. If you change something that is going to cause the
967 # makefile to be rebuilt, you must run "make makefile" before running one
970 # The testing programs use different versions of some modules - usually
971 # with bits cut out that are not relevant to the test in hand. For those
972 # that are used by several tests, we use a different name.
974 sa-globals.o: $(HDRS) globals.c
975 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -o sa-globals.o globals.c
977 sa-os.o: $(HDRS) os.c
978 $(CC) -c $(CFLAGS) $(INCLUDE) \
979 -DFIND_RUNNING_INTERFACES \
982 # These are the test targets themselves
984 test_dbfn: config.h dbfn.c dummies.o sa-globals.o sa-os.o store.o \
985 string.o tod.o version.o utf8.o
986 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE dbfn.c
987 $(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY store.c
988 $(LNCC) -o test_dbfn $(LFLAGS) dbfn.o \
989 dummies.o sa-globals.o sa-os.o store.o string.o \
990 tod.o version.o utf8.o $(LIBS) $(DBMLIB) $(LDFLAGS)
993 test_host: config.h child.c host.c dns.c dummies.c sa-globals.o os.o \
994 host_address.o store.o string.o tod.o tree.o
995 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST child.c
996 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST host.c
997 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dns.c
998 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dummies.c
999 $(LNCC) -o test_host $(LFLAGS) \
1000 host.o host_address.o child.o dns.o dummies.o sa-globals.o os.o store.o string.o \
1001 tod.o tree.o $(LIBS) $(LIBRESOLV)
1002 rm -f child.o dummies.o host.o dns.o
1004 test_os: os.h os.c dummies.o sa-globals.o store.o string.o tod.o utf8.o
1005 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE os.c
1006 $(LNCC) -o test_os $(LFLAGS) os.o dummies.o \
1007 sa-globals.o store.o string.o tod.o utf8.o $(LIBS) $(LDFLAGS)
1010 test_parse: config.h parse.c dummies.o sa-globals.o \
1011 store.o string.o tod.o version.o utf8.o
1012 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE parse.c
1013 $(LNCC) -o test_parse $(LFLAGS) parse.o \
1014 dummies.o sa-globals.o store.o string.o tod.o version.o \
1018 test_string: config.h string.c dummies.o sa-globals.o store.o tod.o utf8.o
1019 $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE string.c
1020 $(LNCC) -o test_string $(LFLAGS) -DSTAND_ALONE string.o \
1021 dummies.o sa-globals.o store.o tod.o utf8.o $(LIBS) $(LDFLAGS)