aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/aws-c-common/ya.make
blob: afc4b7af5b293dcecd65161c6f7c619fda0b5660 (plain) (blame)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Generated by devtools/yamaker from nixpkgs 22.11.

LIBRARY()

LICENSE(
    Apache-2.0 AND
    BSD-3-Clause AND
    MIT AND
    Public-Domain
)

LICENSE_TEXTS(.yandex_meta/licenses.list.txt)

VERSION(0.8.6)

ORIGINAL_SOURCE(https://github.com/awslabs/aws-c-common/archive/v0.8.6.tar.gz)

ADDINCL(
    GLOBAL contrib/restricted/aws/aws-c-common/generated/include
    GLOBAL contrib/restricted/aws/aws-c-common/include
)

NO_COMPILER_WARNINGS()

NO_RUNTIME()

CFLAGS(
    -DAWS_COMMON_USE_IMPORT_EXPORT
    -DAWS_PTHREAD_SETNAME_TAKES_2ARGS
    -DCJSON_HIDE_SYMBOLS
    -DHAVE_SYSCONF
)

IF (MUSL)
    CFLAGS(
        -DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_PTHREAD
    )
ELSEIF (OS_DARWIN)
    CFLAGS(
        -DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_NONE
    )
    LDFLAGS(
        -framework
        CoreFoundation
    )
ELSE()
    CFLAGS(
        -DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_PTHREAD_ATTR
    )
ENDIF()

IF (ARCH_X86_64)
    CFLAGS(
        -DHAVE_MM256_EXTRACT_EPI64
        -DHAVE_AVX2_INTRINSICS
        -DUSE_SIMD_ENCODING
    )
ENDIF()

SRCS(
    source/allocator.c
    source/allocator_sba.c
    source/array_list.c
    source/assert.c
    source/bus.c
    source/byte_buf.c
    source/cache.c
    source/codegen.c
    source/command_line_parser.c
    source/common.c
    source/condition_variable.c
    source/date_time.c
    source/device_random.c
    source/encoding.c
    source/error.c
    source/external/cJSON.c
    source/fifo_cache.c
    source/file.c
    source/hash_table.c
    source/json.c
    source/lifo_cache.c
    source/linked_hash_table.c
    source/log_channel.c
    source/log_formatter.c
    source/log_writer.c
    source/logging.c
    source/lru_cache.c
    source/math.c
    source/memtrace.c
    source/posix/clock.c
    source/posix/condition_variable.c
    source/posix/device_random.c
    source/posix/environment.c
    source/posix/file.c
    source/posix/mutex.c
    source/posix/process.c
    source/posix/rw_lock.c
    source/posix/system_info.c
    source/posix/thread.c
    source/posix/time.c
    source/priority_queue.c
    source/process_common.c
    source/promise.c
    source/ref_count.c
    source/ring_buffer.c
    source/statistics.c
    source/string.c
    source/task_scheduler.c
    source/thread_scheduler.c
    source/thread_shared.c
    source/uri.c
    source/uuid.c
    source/xml_parser.c
)

IF (ARCH_ARM)
    SRCS(
        source/arch/arm/asm/cpuid.c
    )
ELSEIF (ARCH_X86_64)
    SRCS(
        source/arch/intel/asm/cpuid.c
        source/arch/intel/cpuid.c
    )
    SRC_C_AVX2(source/arch/intel/encoding_avx2.c)
ENDIF()

END()