From fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119 Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 8 Oct 2023 19:50:00 +0300 Subject: Use meson build system --- meson.build | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 meson.build (limited to 'meson.build') 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'], +) -- cgit v1.2.1