[crypt - a crypt library based on musl crypto code] branch master, updated. crypt-2_1-release-1-gafff301
yselkowitz-9JcytcrH/[email protected]
| Newsgroups | gmane.os.cygwin.cvs.apps |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/crypt.git;h=afff3016486857657c68bea93b5f803392ecf471 commit afff3016486857657c68bea93b5f803392ecf471 Author: Yaakov Selkowitz <[email protected]> Date: Thu Dec 21 19:12:38 2017 -0600 Add meson build infrastructure Diff: --- meson.build | 35 +++++++++++++++++++++++++++++++++++ meson_options.txt | 2 ++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..b100f2b --- /dev/null +++ b/meson.build @@ -0,0 +1,35 @@ +project('crypt', 'c', + version: '2.1') + +cflags = ['-D_GNU_SOURCE', '-Wno-missing-braces'] + +libcrypt_sources = files( + 'crypt.c', + 'crypt_blowfish.c', + 'crypt_des.c', + 'crypt_md5.c', + 'crypt_r.c', + 'crypt_sha256.c', + 'crypt_sha512.c', + 'encrypt.c' +) + +if not get_option('shared') and not get_option('static') +error('At least one of "shared" or "static" must be enabled.') +endif + +if get_option('shared') +libcrypt_so = shared_library('crypt', libcrypt_sources, + c_args: cflags, + soversion: '0', + vs_module_defs: 'crypt.def', + install: true) +endif + +if get_option('static') +libcrypt_a = static_library('crypt', libcrypt_sources, + c_args: cflags, + install: true) +endif + +install_headers('crypt.h') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..8287708 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('shared', type: 'boolean', value: 'true') +option('static', type: 'boolean', value: 'true')