X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/165acdd1ea3b7399b2279f94c881f8e366efaf71..1d28cc061677bd07d9bed48dd84bd5c590247043:/src/OS/Makefile-Base?ds=sidebyside diff --git a/src/OS/Makefile-Base b/src/OS/Makefile-Base index c96f46f0e..4e1f61a26 100644 --- a/src/OS/Makefile-Base +++ b/src/OS/Makefile-Base @@ -5,7 +5,8 @@ # optional, Local/* files at the front of this file, to create Makefile in the # build directory. # -# Copyright (c) The Exim Maintainers 2017 +# Copyright (c) The Exim Maintainers 1995 - 2022 +# SPDX-License-Identifier: GPL-2.0-or-later SHELL = $(MAKE_SHELL) SCRIPTS = ../scripts @@ -36,7 +37,7 @@ FE = $(FULLECHO) # are set up, and finally it goes to the main Exim target. all: utils exim -config: $(EDITME) checklocalmake Makefile os.c config.h version.h version.sh macro_defs.c +config: $(EDITME) checklocalmake Makefile os.c config.h version.h version.sh macro.c checklocalmake: @if $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE) $(EDITME) || \ @@ -79,24 +80,9 @@ Makefile: ../OS/Makefile-Base ../OS/Makefile-Default \ # Build (link) the os.h file -#os.h: $(SCRIPTS)/Configure-os.h \ -# $(O)/os.h-AIX $(O)/os.h-BSDI $(O)/os.h-cygwin \ -# $(O)/os.h-Darwin $(O)/os.h-DGUX $(O)/os.h-DragonFly \ -# $(O)/os.h-FreeBSD $(O)/os.h-GNU $(O)/os.h-GNUkFreeBSD \ -# $(O)/os.h-GNUkNetBSD $(O)/os.h-HI-OSF \ -# $(O)/os.h-HI-UX $(O)/os.h-HP-UX $(O)/os.h-HP-UX-9 \ -# $(O)/os.h-IRIX $(O)/os.h-IRIX6 $(O)/os.h-IRIX632 \ -# $(O)/os.h-IRIX65 $(O)/os.h-Linux $(O)/os.h-mips \ -# $(O)/os.h-NetBSD $(O)/os.h-NetBSD-a.out \ -# $(O)/os.h-OpenBSD $(O)/os.h-OpenUNIX $(O)/os.h-OSF1 \ -# $(O)/os.h-QNX $(O)/os.h-SCO $(O)/os.h-SCO_SV \ -# $(O)/os.h-SunOS4 $(O)/os.h-SunOS5 $(O)/os.h-SunOS5-hal \ -# $(O)/os.h-ULTRIX $(O)/os.h-UNIX_SV \ -# $(O)/os.h-Unixware7 $(O)/os.h-USG -# $(SHELL) $(SCRIPTS)/Configure-os.h - os.h: $(SCRIPTS)/Configure-os.h \ $(O)/os.h-FreeBSD \ + $(O)/os.h-GNU \ $(O)/os.h-Linux \ $(O)/os.h-OpenBSD \ $(O)/os.h-SunOS5 @@ -104,16 +90,12 @@ os.h: $(SCRIPTS)/Configure-os.h \ # Build the os.c file -#os.c: ../src/os.c \ -# $(SCRIPTS)/Configure-os.c \ -# $(O)/os.c-cygwin $(O)/os.c-GNU $(O)/os.c-HI-OSF \ -# $(O)/os.c-IRIX $(O)/os.c-IRIX6 $(O)/os.c-IRIX632 \ -# $(O)/os.c-IRIX65 $(O)/os.c-Linux $(O)/os.c-OSF1 -# $(SHELL) $(SCRIPTS)/Configure-os.c - os.c: ../src/os.c \ $(SCRIPTS)/Configure-os.c \ - $(O)/os.c-Linux + $(O)/os.c-FreeBSD \ + $(O)/os.c-GNU \ + $(O)/os.c-Linux \ + $(O)/os.c-SunOS5 $(SHELL) $(SCRIPTS)/Configure-os.c # Build the config.h file. @@ -123,19 +105,20 @@ config.h: Makefile buildconfig ../src/config.h.defaults $(EDITME) # Build the builtin-macros data struct -MACRO_HSRC = macro_predef.h os.h globals.h config.h \ +MACRO_HSRC = macro_predef.h os.h globals.h config.h macros.h \ routers/accept.h routers/dnslookup.h routers/ipliteral.h \ routers/iplookup.h routers/manualroute.h routers/queryprogram.h \ routers/redirect.h OBJ_MACRO = macro_predef.o \ macro-globals.o macro-readconf.o macro-route.o macro-transport.o macro-drtables.o \ + macro-acl.o macro-tls.o \ macro-appendfile.o macro-autoreply.o macro-lmtp.o macro-pipe.o macro-queuefile.o \ macro-smtp.o macro-accept.o macro-dnslookup.o macro-ipliteral.o macro-iplookup.o \ macro-manualroute.o macro-queryprogram.o macro-redirect.o \ macro-auth-spa.o macro-cram_md5.o macro-cyrus_sasl.o macro-dovecot.o macro-gsasl_exim.o \ - macro-heimdal_gssapi.o macro-plaintext.o macro-spa.o macro-tls.o\ - macro-dkim.o macro-malware.o macro-macro.o macro-tree.o + macro-heimdal_gssapi.o macro-plaintext.o macro-spa.o macro-authtls.o macro-external.o \ + macro-dkim.o macro-malware.o macro-signing.o $(OBJ_MACRO): $(MACRO_HSRC) @@ -157,6 +140,12 @@ macro-transport.o: transport.c macro-drtables.o : drtables.c @echo "$(CC) -DMACRO_PREDEF drtables.c" $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ drtables.c +macro-acl.o: acl.c + @echo "$(CC) -DMACRO_PREDEF acl.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ acl.c +macro-tls.o: tls.c tls-gnu.c tls-openssl.c + @echo "$(CC) -DMACRO_PREDEF tls.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ tls.c macro-appendfile.o : transports/appendfile.c @echo "$(CC) -DMACRO_PREDEF transports/appendfile.c" $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/appendfile.c @@ -208,6 +197,9 @@ macro-cyrus_sasl.o : auths/cyrus_sasl.c macro-dovecot.o: auths/dovecot.c @echo "$(CC) -DMACRO_PREDEF auths/dovecot.c" $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/dovecot.c +macro-external.o: auths/external.c + @echo "$(CC) -DMACRO_PREDEF auths/external.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/external.c macro-gsasl_exim.o : auths/gsasl_exim.c @echo "$(CC) -DMACRO_PREDEF auths/gsasl_exim.c" $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/gsasl_exim.c @@ -220,7 +212,7 @@ macro-plaintext.o : auths/plaintext.c macro-spa.o : auths/spa.c @echo "$(CC) -DMACRO_PREDEF auths/spa.c" $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/spa.c -macro-tls.o: auths/tls.c +macro-authtls.o: auths/tls.c @echo "$(CC) -DMACRO_PREDEF auths/tls.c" $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/tls.c macro-dkim.o: dkim.c @@ -229,19 +221,16 @@ macro-dkim.o: dkim.c macro-malware.o: malware.c @echo "$(CC) -DMACRO_PREDEF malware.c" $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ malware.c -macro-macro.o: macro.c - @echo "$(CC) -DMACRO_PREDEF macro.c" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ macro.c -macro-tree.o: tree.c - @echo "$(CC) -DMACRO_PREDEF tree.c" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ tree.c +macro-signing.o: pdkim/signing.c + @echo "$(CC) -DMACRO_PREDEF pdkim/signing.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ pdkim/signing.c macro_predef: $(OBJ_MACRO) @echo "$(LNCC) -o $@" $(FE)$(LNCC) -o $@ $(LFLAGS) $(OBJ_MACRO) -macro_defs.c: macro_predef - ./macro_predef > macro_defs.c +macro.c: macro_predef + ./macro_predef > macro.c # This target is recognized specially by GNU make. It records those targets # that do not correspond to files that are being built and which should @@ -480,13 +469,13 @@ convert4r4: config ../src/convert4r4.src # are thrown away by the linker. OBJ_WITH_CONTENT_SCAN = malware.o mime.o regex.o spam.o spool_mbox.o -OBJ_EXPERIMENTAL = bmi_spam.o \ +OBJ_EXPERIMENTAL = arc.o \ + bmi_spam.o \ dane.o \ dcc.o \ dmarc.o \ imap_utf7.o \ spf.o \ - srs.o \ utf8.o # Targets for final binaries; the main one has a build number which is @@ -495,13 +484,14 @@ OBJ_EXPERIMENTAL = bmi_spam.o \ OBJ_LOOKUPS = lookups/lf_quote.o lookups/lf_check_file.o lookups/lf_sqlperform.o OBJ_EXIM = acl.o base64.o child.o crypt16.o daemon.o dbfn.o debug.o deliver.o \ - dkim.o dkim_transport.o directory.o dns.o drtables.o enq.o exim.o \ - expand.o environment.o filter.o filtertest.o globals.o hash.o \ - header.o host.o ip.o log.o lss.o macro.o macro_defs.o match.o moan.o \ - os.o parse.o queue.o \ - rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o \ + directory.o dns.o drtables.o enq.o exim.o expand.o filter.o \ + filtertest.o globals.o dkim.o dkim_transport.o dnsbl.o hash.o \ + header.o host.o host_address.o ip.o log.o lss.o match.o md5.o moan.o \ + os.o parse.o priv.o queue.o \ + rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o regex_cache.o \ route.o search.o sieve.o smtp_in.o smtp_out.o spool_in.o spool_out.o \ std-crypto.o store.o string.o tls.o tod.o transport.o tree.o verify.o \ + environment.o macro.o \ $(OBJ_LOOKUPS) \ local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN) \ $(OBJ_EXPERIMENTAL) @@ -542,12 +532,12 @@ exim_dumpdb: $(OBJ_DUMPDB) # The utility for interrogating/fixing the contents of an exim database -OBJ_FIXDB = exim_fixdb.o util-os.o util-store.o +OBJ_FIXDB = exim_fixdb.o util-os.o util-store.o util-md5.o -exim_fixdb: $(OBJ_FIXDB) buildauths +exim_fixdb: $(OBJ_FIXDB) @echo "$(LNCC) -o exim_fixdb" $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_fixdb $(LFLAGS) $(OBJ_FIXDB) \ - auths/auths.a $(LIBS) $(EXTRALIBS) $(DBMLIB) + $(LIBS) $(EXTRALIBS) $(DBMLIB) @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ echo $(STRIP_COMMAND) exim_fixdb; \ $(STRIP_COMMAND) exim_fixdb; \ @@ -612,16 +602,17 @@ MONBIN = em_StripChart.o $(EXIMON_TEXTPOP) em_globals.o em_init.o \ # The complete modules list also includes some specially compiled versions of # code from the main Exim source tree. -OBJ_MONBIN = util-spool_in.o \ +OBJ_MONBIN = util-host_address.o \ + util-queue.o \ + util-spool_in.o \ util-store.o \ util-string.o \ - util-queue.o \ util-tod.o \ - tree.o \ + util-tree.o \ $(MONBIN) -eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) \ - ../exim_monitor/em_version.c +eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) ../exim_monitor/em_version.c \ + mytypes.h store.h macros.h @echo "$(CC) exim_monitor/em_version.c" $(FE)$(CC) -o em_version.o -c \ $(CFLAGS) $(XINCLUDE) -I. ../exim_monitor/em_version.c @@ -646,11 +637,12 @@ eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) \ HDRS = blob.h \ config.h \ dbfunctions.h \ - dbstuff.h \ exim.h \ functions.h \ globals.h \ hash.h \ + hintsdb.h \ + hintsdb_structs.h \ local_scan.h \ macros.h \ mytypes.h \ @@ -659,10 +651,11 @@ HDRS = blob.h \ os.h PHDRS = ../config.h \ ../dbfunctions.h \ - ../dbstuff.h \ ../exim.h \ ../functions.h \ ../globals.h \ + ../hintsdb.h \ + ../hintsdb_structs.h \ ../local_scan.h \ ../macros.h \ ../mytypes.h \ @@ -673,11 +666,14 @@ PHDRS = ../config.h \ .c.o:; @echo "$(CC) $*.c" $(FE)$(CC) -c $(CFLAGS) -I. $(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $*.c -# Update Exim's version information and build the version object. +# Update Exim's version information and build the version object. The dependency +# chain here avoids problems under parallel-make. -version.h version.sh:: +version.sh: @../scripts/reversion +version.h: version.sh + cnumber.h: version.h version.o: $(HDRS) cnumber.h version.h version.c @@ -727,6 +723,14 @@ exim_dbmbuild.o: $(HDRS) exim_dbmbuild.c # Utilities use special versions of some modules - typically with debugging # calls cut out. +util-host_address.o: $(HDRS) host_address.c + @echo "$(CC) -DCOMPILE_UTILITY host_address.c" + $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-host_address.o host_address.c + +util-md5.o: $(HDRS) md5.c + @echo "$(CC) -DCOMPILE_UTILITY queue.c" + $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-md5.o md5.c + util-spool_in.o: $(HDRS) spool_in.c @echo "$(CC) -DCOMPILE_UTILITY spool_in.c" $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-spool_in.o spool_in.c @@ -747,6 +751,10 @@ util-tod.o: $(HDRS) tod.c @echo "$(CC) -DCOMPILE_UTILITY tod.c" $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-tod.o tod.c +util-tree.o: $(HDRS) tree.c + @echo "$(CC) -DCOMPILE_UTILITY tree.c" + $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-tree.o tree.c + util-os.o: $(HDRS) os.c @echo "$(CC) -DCOMPILE_UTILITY os.c" $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \ @@ -760,7 +768,7 @@ util-os.o: $(HDRS) os.c local_scan.o: config local_scan.h ../$(LOCAL_SCAN_SOURCE) @echo "$(CC) local_scan.c" - $(FE)$(CC) -c $(CFLAGS) -I. $(INCLUDE) -o local_scan.o ../$(LOCAL_SCAN_SOURCE) + $(FE)$(CC) -DLOCAL_SCAN -c $(CFLAGS) -I. $(INCLUDE) -o local_scan.o ../$(LOCAL_SCAN_SOURCE) # Dependencies for the "ordinary" exim modules @@ -773,9 +781,8 @@ dbfn.o: $(HDRS) dbfn.c debug.o: $(HDRS) debug.c deliver.o: $(HDRS) transports/smtp.h deliver.c directory.o: $(HDRS) directory.c -dkim.o: $(HDRS) pdkim/pdkim.h dkim.c -dkim_transport.o: $(HDRS) dkim_transport.c dns.o: $(HDRS) dns.c +dnsbl.o: $(HDRS) dnsbl.c enq.o: $(HDRS) enq.c exim.o: $(HDRS) exim.c expand.o: $(HDRS) expand.c @@ -786,21 +793,23 @@ globals.o: $(HDRS) globals.c hash.o: $(HDRS) hash.c header.o: $(HDRS) header.c host.o: $(HDRS) host.c +host_address.o: $(HDRS) host_address.c ip.o: $(HDRS) ip.c log.o: $(HDRS) log.c lss.o: $(HDRS) lss.c -macro.o: $(HDRS) macro.c -macro_defs.o: $(HDRS) macro_defs.c match.o: $(HDRS) match.c +md5.o: $(HDRS) md5.c moan.o: $(HDRS) moan.c os.o: $(HDRS) $(OS_C_INCLUDES) os.c parse.o: $(HDRS) parse.c +priv.o: $(HDRS) priv.c queue.o: $(HDRS) queue.c rda.o: $(HDRS) rda.c readconf.o: $(HDRS) readconf.c receive.o: $(HDRS) receive.c retry.o: $(HDRS) retry.c rewrite.o: $(HDRS) rewrite.c +regex_cache.o: $(HDRS) regex_cache.c rfc2047.o: $(HDRS) rfc2047.c route.o: $(HDRS) route.c search.o: $(HDRS) search.c @@ -814,11 +823,14 @@ store.o: $(HDRS) store.c string.o: $(HDRS) string.c tls.o: $(HDRS) tls.c \ tls-gnu.c tlscert-gnu.c \ - tls-openssl.c tlscert-openssl.c + tls-openssl.c tlscert-openssl.c \ + tls-cipher-stdname.c tod.o: $(HDRS) tod.c transport.o: $(HDRS) transport.c tree.o: $(HDRS) tree.c verify.o: $(HDRS) transports/smtp.h verify.c +dkim.o: $(HDRS) pdkim/pdkim.h dkim.c +dkim_transport.o: $(HDRS) dkim_transport.c # Dependencies for WITH_CONTENT_SCAN modules @@ -831,13 +843,13 @@ spool_mbox.o: $(HDRS) spool_mbox.c # Dependencies for EXPERIMENTAL_* modules +arc.o: $(HDRS) pdkim/pdkim.h arc.c bmi_spam.o: $(HDRS) bmi_spam.c dane.o: $(HDRS) dane.c dane-openssl.c dcc.o: $(HDRS) dcc.h dcc.c dmarc.o: $(HDRS) pdkim/pdkim.h dmarc.h dmarc.c imap_utf7.o: $(HDRS) imap_utf7.c spf.o: $(HDRS) spf.h spf.c -srs.o: $(HDRS) srs.h srs.c utf8.o: $(HDRS) utf8.c # The module containing tables of available lookups, routers, auths, and @@ -873,9 +885,9 @@ em_text.o: ../exim_monitor/em_text.c ../exim_monitor/em_hdr.h em_xs.o: ../exim_monitor/em_xs.c ../exim_monitor/em_hdr.h em_version.o: ../exim_monitor/em_version.c ../exim_monitor/em_hdr.h $(MONBIN): $(HDRS) - @echo "$(CC) exim_monitor/`echo $@ | sed 's/o$$/c/'`" - $(FE)$(CC) -o $@ -c $(CFLAGS) -I. -I../exim_monitor $(INCLUDE) $(XINCLUDE) \ - ../exim_monitor/`echo $@ | sed 's/o$$/c/'` + @echo "$(CC) exim_monitor/$(@:.o=.c)" + $(FE)$(CC) -o $@ -c $(CFLAGS) -DCOMPILE_UTILITY -I. -I../exim_monitor $(INCLUDE) $(XINCLUDE) \ + ../exim_monitor/$(@:.o=.c) # Targets for the various libraries that Exim uses. @@ -958,13 +970,13 @@ test_dbfn: config.h dbfn.c dummies.o sa-globals.o sa-os.o store.o \ rm -f dbfn.o store.o test_host: config.h child.c host.c dns.c dummies.c sa-globals.o os.o \ - store.o string.o tod.o tree.o + host_address.o store.o string.o tod.o tree.o $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST child.c $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST host.c $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dns.c $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dummies.c $(LNCC) -o test_host $(LFLAGS) \ - host.o child.o dns.o dummies.o sa-globals.o os.o store.o string.o \ + host.o host_address.o child.o dns.o dummies.o sa-globals.o os.o store.o string.o \ tod.o tree.o $(LIBS) $(LIBRESOLV) rm -f child.o dummies.o host.o dns.o