aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build39
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'],
+)