diff options
author | aqua <aqua@iserlohn-fortress.net> | 2023-10-08 19:50:00 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2023-11-27 21:02:22 +0200 |
commit | fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119 (patch) | |
tree | 9607ab4d5f1d4069d4f761a0b25eada36088bd6b /meson.build | |
parent | rules.mk: make include paths absolute (diff) | |
download | kernel-fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119.tar.xz |
Use meson build system
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..b5c6763 --- /dev/null +++ b/meson.build @@ -0,0 +1,39 @@ +project('glitch', ['c', 'cpp'], + version: '0.1.0', + default_options: { + 'c_std': 'c89', + 'cpp_std': 'c++20', + 'warning_level': '3', + 'buildtype': 'plain', + 'b_staticpic': false, + } +) + +# meson includes +subdir('meson/compiler_flags') + +# common dependencies +pymod = import('python') +python = pymod.find_installation() +qemu_i386 = find_program('qemu-system-i386') +gtest = dependency('gtest', main: true, native: true, disabler: true) +gmock = dependency('gmock', native: true, disabler: true) + +# components +subdir('grub') +subdir('lib/libk') +subdir('lib/blake2') +subdir('i686') +subdir('devices') +subdir('src') + +glitch_iso = custom_target('glitch.iso', + input: ['tools/make_iso.py', 'grub/grub.cfg', glitch_elf], + output: 'glitch.iso', + command: [python, '@INPUT0@', '-c=@INPUT1@', '-k=@INPUT2@', '-o=@OUTPUT@'], +) + +run_target('run_i686', + command: [qemu_i386, '-accel', 'kvm', '-machine', 'pc', '-cdrom', glitch_iso, + '-d', 'cpu_reset', '-display', 'gtk,zoom-to-fit=on'], +) |