-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
58 lines (47 loc) · 955 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
47
48
49
50
51
52
53
54
55
56
57
project('ToyOS' , 'c', 'cpp')
nasm = find_program('nasm', required: true)
prog_python = import('python').find_installation('python3')
nasm_c = generator(nasm,
output : '@BASENAME@.o',
arguments : [
'-g',
'-f', 'elf32',
'@INPUT@',
'-o', '@OUTPUT@'])
subdir('common/elf')
subdir('common/limine')
subdir('bootloader')
subdir('kernel')
subdir('apps')
subdir('tools')
# Generate disk image
mk_disk_img = custom_target(
'mk_disk_img',
output: 'ext4_disk.img',
input: [ 'tools/gen_disk.py' ],
command: [
prog_python,
'@INPUT@',
ext4_file_tool,
'@OUTPUT@',
limine_deploy,
limine_sys,
limine_cfg,
kernel_sys,
init_bin,
hello_cpp,
]
)
qemu_script = files('run_qemu.py')
run_qemu = run_target(
'run_qemu',
command: [
prog_python, qemu_script, mk_disk_img
]
)
run_qemu_debug = run_target(
'run_qemu_debug',
command: [
prog_python, qemu_script, mk_disk_img, '-d'
]
)