forked from yakuOS/yaku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
41 lines (32 loc) · 1008 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
project('yaku')
as = find_program('nasm')
ld = find_program('ld')
cc = find_program('gcc')
mkrescue = find_program('grub-mkrescue')
qemu = find_program('qemu-system-x86_64', required: false)
as_gen = generator(as,
output: '@[email protected]',
arguments : ['@INPUT@', '-o', '@OUTPUT@', '@EXTRA_ARGS@']
)
cc_gen = generator(cc,
output: '@[email protected]',
arguments: ['@INPUT@', '-o', '@OUTPUT@', '-Wall', '-Wextra', '@EXTRA_ARGS@']
)
subdir('kernel')
limine_target = custom_target('limine',
output: 'limine',
command: [
'sh', '@SOURCE_ROOT@/make_limine.sh', '@OUTPUT@',
]
)
iso_target = custom_target('iso',
output: 'yaku.iso',
command: ['sh', '@SOURCE_ROOT@/make_iso.sh', '@OUTPUT@', kernel_target, '@PRIVATE_DIR@', '@SOURCE_ROOT@', limine_target]
)
if qemu.found()
qemu_run_target = run_target('qemu-run',
command: [qemu, '-cdrom', iso_target]
)
else
warning('the \'qemu-run\' target is not available because qemu could not be found')
endif