Files
debugcc/meson.build
Dmitry Baryshkov 9db71d48e8 debugcc: switch to meson
Switch to meson as a build system. Define a list of supported platforms
and use it to generate platforms list and the symlink targets.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:01:36 +02:00

65 lines
1.2 KiB
Meson

# SPDX-License-Identifier: BSD-3-Clause
project('debugcc',
'c',
license: ['BSD-3-Clause'],
meson_version : '>= 0.61.0', # for install_symlink
default_options: [
'buildtype=release',
]
)
platforms = [
'msm8936',
'msm8994',
'msm8996',
'msm8998',
'qcs404',
'sc8280xp',
'sdm845',
'sm6115',
'sm6125',
'sm6350',
'sm6375',
'sm8150',
'sm8250',
'sm8350',
'sm8450',
'sm8550',
]
debugcc_srcs = [
'debugcc.c',
]
platform_defs = []
platform_array = ['const struct debugcc_platform *platforms[] = {']
foreach p: platforms
debugcc_srcs += p + '.c'
platform_defs += 'extern struct debugcc_platform ' + p + '_debugcc;'
platform_array += '\t&' + p + '_debugcc,'
install_symlink(p + '-debugcc',
install_dir: get_option('bindir'),
pointing_to: 'debugcc')
endforeach
platform_array += '\tNULL,'
platform_array += '};'
debugcc_srcs += configure_file(
output: 'platforms.c',
capture: true,
command: ['echo',
'/* Autogenerated file, do not edit */\n\n' +
'#include <stdlib.h>\n\n' +
'\n'.join(platform_defs) +
'\n\n' +
'\n'.join(platform_array)
])
executable('debugcc',
debugcc_srcs,
install: true)