source: mainline/meson.build@ 200b211

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 200b211 was 200b211, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 7 years ago

Reorganize main meson.build script

I split most of it into separate subdirs, so that the overall organization
is easier to follow.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1# TODO: Use vcs_tag() to generate version string
2# TODO: jobfile
3# TODO: lto in uspace
4# TODO: fix clang build
5
6project(
7 'HelenOS',
8 [ 'c', 'cpp' ],
9 default_options : ['buildtype=plain', 'c_std=gnu11', 'cpp_std=c++17', 'warning_level=3', 'werror=false', 'b_staticpic=false', 'prefix=/' ],
10 meson_version: '>=0.50.1',
11)
12
13debug_options = false
14debug_shell_scripts = false
15
16subdir('doxygen')
17subdir('meson/part/tools')
18subdir('meson/part/read_config')
19subdir('meson/part/compiler_args')
20subdir('meson/part/initrd_manifest')
21subdir('meson' / 'arch' / UARCH)
22
23## The at-sign
24#
25# The `atsign` variable holds the ASCII character representing the at-sign
26# ('@') used in various $(AS) constructs (e.g. @progbits). On architectures that
27# don't use '@' for starting a comment, `atsign` is merely '@'. However, on
28# those that do use it for starting a comment (e.g. arm32), `atsign` must be
29# defined as the percentile-sign ('%') in the architecture-dependent files.
30#
31if not is_variable('atsign')
32 atsign = '@'
33endif
34
35## Some architectures need a particular string at the beginning of assembly files.
36if not is_variable('kernel_as_prolog')
37 kernel_as_prolog = ''
38endif
39if not is_variable('uspace_as_prolog')
40 uspace_as_prolog = ''
41endif
42
43# The following variables are filled in by code in the kernel and uspace subdirs.
44
45# References to the actual binary artefacts that will be part of initrd image.
46rd_init_binaries = []
47# Installed files.
48install_files = []
49install_deps = []
50# Install script for headers.
51# TODO: Make a list of directories and turn into script later.
52uspace_lib_install_script_text = []
53
54subdir('kernel')
55subdir('uspace')
56
57subdir('meson/part/exports')
58subdir('meson/part/initrd')
59
60subdir('boot')
61
62# Copy the final image to the build root,
63# and write its name to a text file `image_path`.
64
65if is_variable('POST_INPUT')
66 image = custom_target(POST_OUTPUT,
67 output: POST_OUTPUT,
68 input: POST_INPUT,
69 command: [ cp, '@INPUT@', '@OUTPUT@' ],
70 )
71
72 custom_target('image_path',
73 output: 'image_path',
74 input: image,
75 command: [ 'echo', '@INPUT@' ],
76 capture: true,
77 )
78else
79 custom_target('image_path',
80 output: 'image_path',
81 command: [ 'echo' ],
82 capture: true,
83 )
84endif
85
86subdir('meson/part/extra_targets')
Note: See TracBrowser for help on using the repository browser.