summaryrefslogtreecommitdiff
path: root/src/third_party/tomcrypt-1.18.2/SConscript
blob: 0d47496892a6a8a464176ee59e4670898ff43466 (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
48
49
# -*- mode: python -*-

Import([
    "env",
    ])

env = env.Clone()

env['CCFLAGS_WERROR'] = []

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

for to_remove in ['-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",
    ],
)