summaryrefslogtreecommitdiff
path: root/src/third_party/tomcrypt-1.18.2/SConscript
blob: e65a117983edf457bbc769593fd6c3744c3f365f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -*- mode: python -*-

Import([
    "env",
    ])

env = env.Clone()

def removeIfPresent(lst, item):
    try:
        lst.remove(item)
    except ValueError:
        pass

for to_remove in ['-Werror', '-Wall', '-W']:
    removeIfPresent(env['CCFLAGS'], to_remove)

env.Prepend(CPPPATH=[
    'src/headers',
])

env.Append(
    CPPDEFINES=[
        'LTC_NO_PROTOTYPES',
    ]
)

env.Library(
    target="tomcrypt",
    source= [
        "src/hashes/helper/hash_memory.c",
        "src/hashes/sha1.c",
        "src/hashes/sha2/sha256.c",
        "src/hashes/sha2/sha512.c",
        "src/mac/hmac/hmac_done.c",
        "src/mac/hmac/hmac_init.c",
        "src/mac/hmac/hmac_memory.c",
        "src/mac/hmac/hmac_process.c",
        "src/misc/compare_testvector.c",
        "src/misc/crypt/crypt_argchk.c",
        "src/misc/crypt/crypt_find_hash.c",
        "src/misc/crypt/crypt_hash_descriptor.c",
        "src/misc/crypt/crypt_hash_is_valid.c",
        "src/misc/crypt/crypt_register_hash.c",
        "src/misc/zeromem.c",
    ],
)