2018-02-20 11:33:19 +03:00
|
|
|
files = [
|
|
|
|
'adler32.c',
|
|
|
|
'calc.c',
|
|
|
|
'crca.c',
|
|
|
|
'entropy.c',
|
|
|
|
'hamdist.c',
|
|
|
|
'hash.c',
|
|
|
|
'luhn.c',
|
2018-08-06 15:18:50 +02:00
|
|
|
'state.c'
|
2017-05-02 05:05:36 +02:00
|
|
|
]
|
|
|
|
|
2018-08-06 15:18:50 +02:00
|
|
|
dependencies = [mth, r_util_dep]
|
|
|
|
|
|
|
|
if use_sys_xxhash
|
|
|
|
dependencies += [sys_xxhash]
|
|
|
|
else
|
|
|
|
files += ['xxhash.c']
|
|
|
|
endif
|
|
|
|
|
2018-08-10 10:17:48 +02:00
|
|
|
if use_sys_openssl
|
|
|
|
dependencies += [sys_openssl]
|
|
|
|
else
|
|
|
|
files += ['md4.c', 'md5.c', 'sha1.c', 'sha2.c']
|
|
|
|
endif
|
|
|
|
|
2017-06-28 22:54:40 +02:00
|
|
|
r_hash = library('r_hash', files,
|
2017-05-31 13:38:47 +02:00
|
|
|
include_directories: [platform_inc],
|
2018-08-06 15:18:50 +02:00
|
|
|
dependencies: dependencies,
|
2018-02-20 11:33:19 +03:00
|
|
|
install: true,
|
2018-03-24 20:18:32 +03:00
|
|
|
implicit_include_directories: false,
|
2018-04-28 11:02:55 +03:00
|
|
|
soversion: r2_libversion
|
2017-05-02 05:05:36 +02:00
|
|
|
)
|
2018-03-03 13:00:18 +01:00
|
|
|
|
2018-07-09 16:58:38 +02:00
|
|
|
r_hash_dep = declare_dependency(link_with: r_hash,
|
|
|
|
include_directories: [platform_inc])
|
|
|
|
|
2018-03-23 09:47:46 +03:00
|
|
|
pkgconfig_mod.generate(
|
|
|
|
libraries: [r_hash],
|
|
|
|
subdirs: 'libr',
|
2018-04-28 11:02:55 +03:00
|
|
|
version: r2_version,
|
2018-03-23 09:47:46 +03:00
|
|
|
name: 'r_hash',
|
|
|
|
filebase: 'r_hash',
|
|
|
|
requires: [
|
|
|
|
'r_util'
|
|
|
|
],
|
|
|
|
description: 'radare foundation libraries'
|
|
|
|
)
|