diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 17:42:36 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 17:42:36 +0200 |
commit | e8046bd96422c3bedaa0f0e693cac28d3458d4bd (patch) | |
tree | d9c070fd3ac628430ebd569e9646735844724b88 | |
parent | 7e9fe9395c02dfe12188b02fd3c8315ef02b4436 (diff) |
build cleanup in src
Downgraded datetime from a static library to two combined files.
Moved dkim_slib closer to usage and removed redundant files for qmail-dkim.
Removed and alphabetically reordered some c-files.
-rw-r--r-- | src/meson.build | 77 |
1 files changed, 30 insertions, 47 deletions
diff --git a/src/meson.build b/src/meson.build index 5a2bc76..1f33050 100644 --- a/src/meson.build +++ b/src/meson.build @@ -9,28 +9,19 @@ auto_break_c = custom_target( capture : true) -dkim_slib = static_library('qdkim', - 'dkim.cpp', 'dkimbase.cpp', 'dkimsign.cpp', 'dkimverify.cpp', - include_directories : inc, - dependencies : dnsresolv_dep, - build_by_default : false) - -datetime_slib = static_library('datetime', 'datetime.c', 'datetime_un.c', - include_directories : inc, - build_by_default : false) +datetime_c = ['datetime.c', 'datetime_un.c'] if get_option('build-srs') executable('srsforward', - 'srsforward.c', 'qmail.c', 'control.c', 'srs2.c', 'sha1.c', + 'srsforward.c', 'control.c', 'qmail.c', 'sha1.c', 'srs2.c', include_directories : inc, install : true, dependencies : qlibs_dep) executable('srsreverse', - 'srsreverse.c', 'qmail.c', 'control.c', 'srs2.c', 'sha1.c', - auto_break_c, + 'srsreverse.c', auto_break_c, 'control.c', 'qmail.c', 'sha1.c', 'srs2.c', include_directories : inc, install : true, dependencies : qlibs_dep) @@ -50,7 +41,7 @@ if get_option('build-user') dependencies : qlibs_dep, install : true) - executable('qmail-pw2u', 'qmail-pw2u.c', 'control.c', auto_break_c, + executable('qmail-pw2u', 'qmail-pw2u.c', auto_break_c, 'control.c', include_directories : inc, install : true, dependencies : qlibs_dep) @@ -66,28 +57,25 @@ endif if get_option('build-server') executable('qmail-qmtpd', - 'qmail-qmtpd.c', 'rcpthosts.c', 'control.c', 'received.c', - 'date822fmt.c', 'now.c', 'qmail.c', auto_break_c, + 'qmail-qmtpd.c', 'control.c', 'date822fmt.c', datetime_c, 'now.c', + 'qmail.c', 'rcpthosts.c', 'received.c', include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('qmail-qmqpd', - 'qmail-qmqpd.c', 'received.c', 'now.c', 'date822fmt.c', 'qmail.c', + 'qmail-qmqpd.c', 'date822fmt.c', datetime_c, 'now.c', 'received.c', 'qmail.c', include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('qmail-smtpd', - 'qmail-smtpd.c', 'rcpthosts.c', 'commands.c', 'ipme.c', - 'control.c', 'received.c', 'recipients.c', 'mfrules.c', - 'tls_start.c', 'smtpdlog.c', 'dns.c', 'date822fmt.c', 'now.c', 'qmail.c', - 'wildmat.c', 'spf.c', 'spfdnsip.c', 'base64.c', auto_break_c, + '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, - link_with : datetime_slib, dependencies : [qlibs_dep, dnsresolv_dep]) endif @@ -96,16 +84,14 @@ endif if get_option('build-queue') executable('qmail-qread', - 'qmail-qread.c', 'fmtqfn.c', 'readsubdir.c', 'date822fmt.c', + 'qmail-qread.c', 'date822fmt.c', datetime_c, 'fmtqfn.c', 'readsubdir.c', include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) - executable('qmail-tcpto', 'qmail-tcpto.c', 'now.c', + executable('qmail-tcpto', 'qmail-tcpto.c', datetime_c, 'now.c', include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('qmail-tcpok', 'qmail-tcpok.c', @@ -119,8 +105,7 @@ endif if get_option('build-pam') executable('qmail-authuser', - 'qmail-authuser.c', 'control.c', 'hmac_md5.c', 'md5c.c', - 'sha1.c', 'sha256.c', + 'qmail-authuser.c', 'control.c', 'hmac_md5.c', 'md5c.c', 'sha1.c', 'sha256.c', include_directories : inc, install : true, dependencies : [qlibs_dep, crypt_dep]) @@ -297,10 +282,9 @@ if get_option('build-dns') dependencies : [qlibs_dep, dnsresolv_dep]) executable('spfquery', - 'spfquery.c', 'spf.c', 'ipme.c', 'now.c', 'dns.c', 'spfdnsip.c', + 'spfquery.c', 'spf.c', 'ipme.c', 'now.c', 'dns.c', 'spfdnsip.c', datetime_c, include_directories : inc, install : true, - link_with : datetime_slib, dependencies : [qlibs_dep, dnsresolv_dep]) endif @@ -308,12 +292,17 @@ endif if get_option('build-dkim') - executable('qmail-dkim', - 'qmail-dkim.cpp', 'dkim.cpp', 'dkimbase.cpp', 'dkimsign.cpp', 'dkimverify.cpp', + 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.cpp', include_directories : inc, install : true, link_with : dkim_slib, - dependencies : [qlibs_dep, dnsresolv_dep, ssl_dep, crypto_dep]) + dependencies : qlibs_dep) executable('qmail-dksign', 'qmail-dksign.c', 'control.c', 'fmtqfn.c', 'rcpthosts.c', @@ -322,7 +311,7 @@ if get_option('build-dkim') dependencies : qlibs_dep) executable('qmail-dkverify', - 'qmail-dkverify.c', 'control.c', 'fmtqfn.c', 'qmail.c', + 'qmail-dkverify.c', 'control.c', 'fmtqfn.c', include_directories : inc, install : true, dependencies : qlibs_dep) @@ -355,10 +344,9 @@ endif if get_option('build-mbox') - executable('predate', 'predate.c', + executable('predate', 'predate.c', datetime_c, include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('preline', 'preline.c', dependencies : qlibs_dep, install : true) @@ -375,10 +363,9 @@ if get_option('build-mbox') executable('maildirmake', 'maildirmake.c', dependencies : qlibs_dep, install : true) executable('maildir2mbox', - 'maildir2mbox.c', 'maildir.c', 'prioq.c', 'now.c', 'myctime.c', 'gfrom.c', + 'maildir2mbox.c', 'maildir.c', 'prioq.c', 'now.c', 'myctime.c', 'gfrom.c', datetime_c, include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('maildirwatch', @@ -405,10 +392,9 @@ if get_option('build-base') executable('qmail-local', 'qmail-local.c', 'qmail.c', 'quote.c', 'now.c', 'gfrom.c', 'myctime.c', - auto_break_c, + auto_break_c, datetime_c, include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('qmail-rspawn', @@ -425,10 +411,9 @@ if get_option('build-base') 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', + 'qmail.c', 'date822fmt.c', datetime_c, include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('qmail-qmaint', @@ -449,18 +434,16 @@ if get_option('build-base') install : true) executable('qmail-queue', - 'qmail-queue.c', 'trigger.c', 'fmtqfn.c', 'now.c', 'date822fmt.c', + 'qmail-queue.c', 'trigger.c', 'fmtqfn.c', 'now.c', 'date822fmt.c', datetime_c, include_directories : inc, install : true, - link_with : datetime_slib, 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', + 'control.c', 'date822fmt.c', 'qmail.c', 'token822.c', datetime_c, include_directories : inc, install : true, - link_with : datetime_slib, dependencies : qlibs_dep) executable('qmail-todo', |