subdir('include') auto_break = get_option('break') assert(auto_break[0] == auto_break) assert(auto_break not in ['"', '\\']) auto_break_c = custom_target( output : 'auto_break.c', command : ['echo', f'char auto_break[] = "@auto_break@";'], capture : true, ) datetime_c = ['datetime.c', 'datetime_un.c'] if get_option('build-srs') executable( 'srsforward', 'srsforward.c', 'control.c', 'qmail.c', 'sha1.c', 'srs2.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'srsreverse', 'srsreverse.c', auto_break_c, 'control.c', 'qmail.c', 'sha1.c', 'srs2.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-user') executable( 'qmail-getpw', 'qmail-getpw.c', auto_break_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-newu', 'qmail-newu.c', include_directories : inc, dependencies : qlibs_dep, install : true, ) executable( 'qmail-pw2u', 'qmail-pw2u.c', auto_break_c, 'control.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-newmrh', 'qmail-newmrh.c', include_directories : inc, dependencies : qlibs_dep, install : true, ) endif if get_option('build-server') executable( 'qmail-qmtpd', 'qmail-qmtpd.c', 'control.c', 'date822fmt.c', datetime_c, 'now.c', 'qmail.c', 'rcpthosts.c', 'received.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-qmqpd', 'qmail-qmqpd.c', 'date822fmt.c', datetime_c, 'now.c', 'received.c', 'qmail.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-smtpd', 'qmail-smtpd.c', auto_break_c, 'commands.c', 'control.c', 'date822fmt.c', datetime_c, 'dns.c', 'ipme.c', 'mfrules.c', 'now.c', 'qmail.c', 'rcpthosts.c', 'received.c', 'recipients.c', 'smtpdlog.c', 'spf.c', 'spfdnsip.c', 'tls_start.c', 'wildmat.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) endif if get_option('build-queue') executable( 'qmail-qread', 'qmail-qread.c', 'date822fmt.c', datetime_c, 'fmtqfn.c', 'readsubdir.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-tcpto', 'qmail-tcpto.c', datetime_c, 'now.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-tcpok', 'qmail-tcpok.c', include_directories : inc, dependencies : qlibs_dep, install : true, ) endif if get_option('build-pam') executable( 'qmail-authuser', 'qmail-authuser.c', 'control.c', 'hmac_md5.c', 'md5c.c', 'sha1.c', 'sha256.c', include_directories : inc, install : true, dependencies : [qlibs_dep, crypt_dep], ) executable( 'qmail-smtpam', 'qmail-smtpam.c', 'control.c', 'now.c', 'dns.c', 'ipme.c', 'quote.c', 'tcpto.c', 'tls_timeoutio.c', 'tls_errors.c', 'tls_remote.c', 'dns_tlsa.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep, ucspissl_dep, ssl_dep, crypto_dep], ) executable( 'qmail-vmailuser', 'qmail-vmailuser.c', 'control.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable('qmail-postgrey', 'qmail-postgrey.c', dependencies : qlibs_dep, install : true) endif if get_option('build-log') executable('splogger', 'splogger.c', dependencies : qlibs_dep, install : true) executable( 'qmail-mrtg', 'qmail-mrtg.c', 'now.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable('tai64nfrac', 'tai64nfrac.c', dependencies : qlibs_dep, install : true) endif if get_option('build-control') executable( 'qmail-badmimetypes', 'qmail-badmimetypes.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-badloadertypes', 'qmail-badloadertypes.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-mfrules', 'qmail-mfrules.c', include_directories : inc, dependencies : qlibs_dep, install : true, ) executable( 'qmail-recipients', 'qmail-recipients.c', include_directories : inc, dependencies : qlibs_dep, install : true, ) executable( 'qmail-showctl', 'qmail-showctl.c', 'control.c', auto_break_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-forward') or get_option('build-mbox') executable( 'forward', 'forward.c', 'qmail.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-forward') executable( 'fastforward', 'fastforward.c', 'qmail.c', 'strset.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable('printforward', 'printforward.c', dependencies : qlibs_dep, install : true) executable('setforward', 'setforward.c', dependencies : qlibs_dep, install : true) executable( 'newaliases', 'newaliases.c', 'token822.c', 'control.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable('printmaillist', 'printmaillist.c', dependencies : qlibs_dep, install : true) executable('setmaillist', 'setmaillist.c', dependencies : qlibs_dep, install : true) executable( 'newinclude', 'newinclude.c', 'token822.c', 'control.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-setup') executable( 'install-sqmail', 'install.c', 'hier.c', 'fifo.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'instcheck', 'instcheck.c', 'hier.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-pop') executable( 'qmail-popup', 'qmail-popup.c', 'commands.c', 'now.c', 'tls_start.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-pop3d', 'qmail-pop3d.c', 'commands.c', 'maildir.c', 'prioq.c', 'now.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-dns') executable( 'dnscname', 'dnscname.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable( 'dnsptr', 'dnsptr.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable( 'dnsip', 'dnsip.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable( 'dnsmxip', 'dnsmxip.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable( 'dnsfq', 'dnsfq.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable( 'dnstlsa', 'dnstlsa.c', 'dns_tlsa.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable( 'dnstxt', 'dnstxt.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable('hostname', 'hostname.c', dependencies : [qlibs_dep, dnsresolv_dep], install : true) executable( 'ipmeprint', 'ipmeprint.c', 'ipme.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) executable( 'spfquery', 'spfquery.c', 'spf.c', 'ipme.c', 'now.c', 'dns.c', 'spfdnsip.c', datetime_c, include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep], ) endif if get_option('build-dkim') dkim_slib = static_library( 'qdkim', 'dkim.cpp', 'dkimbase.cpp', 'dkimsign.cpp', 'dkimverify.cpp', include_directories : inc, dependencies : [dnsresolv_dep, ssl_dep, crypto_dep], build_by_default : false, ) executable( 'qmail-dkim', 'qmail-dkim.c', include_directories : inc, install : true, link_with : dkim_slib, dependencies : qlibs_dep, ) executable( 'qmail-dksign', 'qmail-dksign.c', 'control.c', 'fmtqfn.c', 'rcpthosts.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-dkverify', 'qmail-dkverify.c', 'control.c', 'fmtqfn.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-clients') executable( 'qmail-remote', 'qmail-remote.c', 'control.c', 'tcpto.c', 'now.c', 'dns.c', 'ipme.c', 'quote.c', 'tls_timeoutio.c', 'tls_errors.c', 'tls_remote.c', 'dns_tlsa.c', 'base64.c', 'md5c.c', 'hmac_md5.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep, idn2_dep, ssl_dep, crypto_dep, ucspissl_dep], ) executable( 'qmail-qmqpc', 'qmail-qmqpc.c', 'control.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'sendmail', 'sendmail.c', include_directories : inc, dependencies : qlibs_dep, install : true, ) endif if get_option('build-mbox') executable( 'predate', 'predate.c', datetime_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) executable('preline', 'preline.c', dependencies : qlibs_dep, install : true) executable( 'condredirect', 'condredirect.c', 'qmail.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable('bouncesaying', 'bouncesaying.c', dependencies : qlibs_dep, install : true) executable('except', 'except.c', dependencies : qlibs_dep, install : true) executable('maildirmake', 'maildirmake.c', dependencies : qlibs_dep, install : true) executable( 'maildir2mbox', 'maildir2mbox.c', 'maildir.c', 'prioq.c', 'now.c', 'myctime.c', 'gfrom.c', datetime_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'maildirwatch', 'maildirwatch.c', 'hfield.c', 'headerbody.c', 'maildir.c', 'prioq.c', 'now.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qbiff', 'qbiff.c', 'headerbody.c', 'hfield.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qreceipt', 'qreceipt.c', 'headerbody.c', 'hfield.c', 'quote.c', 'token822.c', 'qmail.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-base') executable( 'qmail-local', 'qmail-local.c', 'qmail.c', 'quote.c', 'now.c', 'gfrom.c', 'myctime.c', auto_break_c, datetime_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-rspawn', 'qmail-rspawn.c', 'spawn.c', 'tcpto_clean.c', 'now.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-lspawn', 'qmail-lspawn.c', 'spawn.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-send', 'qmail-send.c', 'qsutil.c', 'control.c', 'newfield.c', 'prioq.c', 'trigger.c', 'fmtqfn.c', 'quote.c', 'now.c', 'readsubdir.c', 'qmail.c', 'date822fmt.c', datetime_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-qmaint', 'qmail-qmaint.c', 'fifo.c', 'fmtqfn.c', 'readsubdir.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-clean', 'qmail-clean.c', 'fmtqfn.c', 'now.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-start', 'qmail-start.c', include_directories : inc, dependencies : qlibs_dep, install : true, ) executable( 'qmail-queue', 'qmail-queue.c', 'trigger.c', 'fmtqfn.c', 'now.c', 'date822fmt.c', datetime_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-inject', 'qmail-inject.c', 'headerbody.c', 'hfield.c', 'newfield.c', 'quote.c', 'now.c', 'control.c', 'date822fmt.c', 'qmail.c', 'token822.c', datetime_c, include_directories : inc, install : true, dependencies : qlibs_dep, ) executable( 'qmail-todo', 'qmail-todo.c', 'control.c', 'trigger.c', 'fmtqfn.c', 'now.c', 'qsutil.c', 'readsubdir.c', include_directories : inc, install : true, dependencies : qlibs_dep, ) endif if get_option('build-analog') executable('matchup', 'matchup.c', dependencies : qlibs_dep, install : true) executable('columnt', 'columnt.c', dependencies : qlibs_dep, install : true) endif