-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
46 lines (41 loc) · 987 Bytes
/
meson.build
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
project(
'skeletonOS',
'c',
version : '0.0.0',
license : 'MIT',
default_options : ['warning_level=3', 'c_std=gnu99']
)
inc = [include_directories('include')]
libc_source_files = []
project_header_files = [libc_source_files]
project_source_files = []
test_source_files = []
subdir('include')
subdir('linker-scripts')
subdir('src')
subdir('tests')
cmocka_proj = subproject('cmocka')
cmocka_dep = cmocka_proj.get_variable('cmocka_dep')
if meson.get_external_property('libc_only', false)
libc = library(
'c',
libc_source_files,
include_directories : inc,
)
testbin = executable(
'testbin',
test_source_files,
include_directories : inc,
dependencies : [cmocka_dep],
link_with : [libc],
)
test('cmocka tests', testbin)
else
os_bin = executable(
'os.bin',
[project_source_files, libc_source_files],
include_directories : inc,
link_args : [linker_script_flags, '-lgcc'],
link_depends : linker_script_deps,
)
endif