aboutsummaryrefslogtreecommitdiff
path: root/meson.build
blob: b5c67635cd3ced6ffedb7750b0ef2b5dee8d7fd2 (plain)
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
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'],
)