source: mainline/meson.build@ b57ba05

Last change on this file since b57ba05 was 1dbba6c, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 4 years ago

Update headers in Meson build files

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