2023-10-28 05:07:20 +03:00
|
|
|
# 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',
|
2025-12-05 13:09:35 +01:00
|
|
|
],
|
|
|
|
|
version: '0.1.0',
|
|
|
|
|
)
|
2023-10-28 05:07:20 +03:00
|
|
|
|
|
|
|
|
platforms = [
|
2023-06-13 17:38:16 +02:00
|
|
|
'ipq8064',
|
2023-10-28 05:07:20 +03:00
|
|
|
'msm8936',
|
2025-06-18 22:47:44 +02:00
|
|
|
'msm8974',
|
2023-10-28 05:07:20 +03:00
|
|
|
'msm8994',
|
|
|
|
|
'msm8996',
|
|
|
|
|
'msm8998',
|
2023-04-12 16:28:21 +02:00
|
|
|
'qcm2290',
|
2025-07-04 11:34:09 +02:00
|
|
|
'qcs404',
|
2023-06-16 12:56:32 +02:00
|
|
|
'sc7180',
|
2023-10-28 05:07:20 +03:00
|
|
|
'sc8280xp',
|
|
|
|
|
'sdm845',
|
|
|
|
|
'sm6115',
|
|
|
|
|
'sm6125',
|
|
|
|
|
'sm6350',
|
|
|
|
|
'sm6375',
|
|
|
|
|
'sm8150',
|
|
|
|
|
'sm8250',
|
|
|
|
|
'sm8350',
|
|
|
|
|
'sm8450',
|
|
|
|
|
'sm8550',
|
2023-08-21 17:51:28 +02:00
|
|
|
'sm8650',
|
2023-10-28 05:07:20 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
debugcc_srcs = [
|
|
|
|
|
'debugcc.c',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
platform_defs = []
|
2023-11-06 12:52:25 +01:00
|
|
|
platform_array = []
|
2023-10-28 05:07:20 +03:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2023-11-06 12:52:25 +01:00
|
|
|
platforms = configuration_data()
|
|
|
|
|
platforms.set('PLATFORM_DEFS', '\n'.join(platform_defs))
|
|
|
|
|
platforms.set('PLATFORM_ARRAY', '\n'.join(platform_array))
|
2023-10-28 05:07:20 +03:00
|
|
|
|
|
|
|
|
debugcc_srcs += configure_file(
|
2023-11-06 12:52:25 +01:00
|
|
|
input: 'platforms.c.in',
|
2023-10-28 05:07:20 +03:00
|
|
|
output: 'platforms.c',
|
2023-11-06 12:52:25 +01:00
|
|
|
configuration: platforms)
|
2023-10-28 05:07:20 +03:00
|
|
|
|
2025-11-24 22:28:12 +00:00
|
|
|
debugcc_link_args = []
|
|
|
|
|
if not get_option('dynamic-linking')
|
|
|
|
|
debugcc_link_args += ['-static', '-static-libgcc']
|
|
|
|
|
endif
|
|
|
|
|
|
2023-10-28 05:07:20 +03:00
|
|
|
executable('debugcc',
|
|
|
|
|
debugcc_srcs,
|
2025-11-24 22:28:12 +00:00
|
|
|
link_args: debugcc_link_args,
|
2023-10-28 05:07:20 +03:00
|
|
|
install: true)
|