diff options
Diffstat (limited to 'openssl/buildfile')
-rw-r--r-- | openssl/buildfile | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/openssl/buildfile b/openssl/buildfile new file mode 100644 index 0000000..ec54bb6 --- /dev/null +++ b/openssl/buildfile @@ -0,0 +1,75 @@ +# file : openssl/buildfile -*- C++ -*- +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +import libs = libbutl%lib{butl} + +./: exe{openssl-client} exe{openssl-agent-pkcs11} + +exe{openssl-client}: client/{hxx ixx txx cxx}{* -options} \ + client/{hxx ixx cxx}{options} libue{openssl} + +exe{openssl-agent-pkcs11}: agent/pkcs11/cxx{agent} agent/pkcs11/libue{openssl} + +agent/pkcs11/ +{ + libue{openssl}: bin.whole = false + libue{openssl}: cxx.libs += -ldl + libue{openssl}: {hxx ixx txx cxx}{* -agent -options -*.test...} \ + {hxx ixx cxx}{options} h{pkcs11} ../../libue{openssl} +} + +libue{openssl}: bin.whole = false +libue{openssl}: {hxx ixx txx cxx}{* -options -version -*.test...} \ + {hxx ixx cxx}{options} {hxx}{version} $libs + +hxx{version}: in{version} $src_root/manifest + +# Unit tests. +# +exe{*.test}: test = true +exe{*.test}: install = false + +for t: cxx{**.test...} +{ + d = $directory($t) + n = $name($t)... + + ./: $d/exe{$n} + $d/exe{$n}: $t $d/{hxx ixx txx}{+$n} $d/testscript{+$n} + $d/exe{$n}: $d/libue{openssl} +} + +# Generated options parser. +# +if $cli.configured +{ + cli.cxx{options}: cli{options} + client/cli.cxx{options}: client/cli{options} + agent/pkcs11/cli.cxx{options}: agent/pkcs11/cli{options} + + cli.options += -I $src_root --include-with-brackets \ +--cxx-prologue "#include <openssl/types-parsers.hxx>" \ +--cli-namespace openssl::cli --generate-specifier --generate-parse + + cli.cxx{options}: cli.options += --include-prefix openssl \ +--guard-prefix OPENSSL # No usage. + + # Usage options. + # + cli.options += --suppress-undocumented --long-usage --ansi-color \ +--page-usage 'openssl::print_$name$_' --option-length 20 + + client/cli.cxx{options}: cli.options += --include-prefix openssl/client \ +--guard-prefix OPENSSL_CLIENT + + agent/pkcs11/cli.cxx{options}: cli.options += \ +--include-prefix openssl/agent/pkcs11 --guard-prefix OPENSSL_AGENT_PKCS11 + + # Include the generated cli files into the distribution and don't remove + # them when cleaning in src (so that clean results in a state identical to + # distributed). + # + cli.cxx{*}: dist = true + cli.cxx{*}: clean = ($src_root != $out_root) +} |