misc: Implemented an 'all' mode for the Meson build system
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
e1746a04ae
commit
04977998c2
@@ -34,9 +34,11 @@ target_paths = {
|
|||||||
'stm32f1': 'stm32/f1'
|
'stm32f1': 'stm32/f1'
|
||||||
}
|
}
|
||||||
|
|
||||||
target_path = target_paths[target_platform]
|
if target_platform != 'all'
|
||||||
subdir(f'libopencm3/@target_path@')
|
target_path = target_paths[target_platform]
|
||||||
|
subdir(f'libopencm3/@target_path@')
|
||||||
target_vector_nvic = declare_dependency(
|
else
|
||||||
sources: target_nvic_header,
|
foreach target_name, target_path : target_paths
|
||||||
)
|
subdir(f'libopencm3/@target_path@')
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
|||||||
@@ -36,6 +36,6 @@ subdir('cm3')
|
|||||||
locm3_ld_script_path = meson.current_source_dir()
|
locm3_ld_script_path = meson.current_source_dir()
|
||||||
|
|
||||||
# Now take the platform target and map it to a suitable target family
|
# Now take the platform target and map it to a suitable target family
|
||||||
if target_platform.startswith('stm32')
|
if target_platform.startswith('stm32') or target_platform == 'all'
|
||||||
subdir('stm32')
|
subdir('stm32')
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -52,4 +52,10 @@ subdirs = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Bring in the proper target subdir for the requested target platform
|
# Bring in the proper target subdir for the requested target platform
|
||||||
subdir(subdirs[target_platform])
|
if target_platform != 'all'
|
||||||
|
subdir(subdirs[target_platform])
|
||||||
|
else
|
||||||
|
foreach subdir_name, subdir_path : subdirs
|
||||||
|
subdir(subdir_path)
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ option(
|
|||||||
'target',
|
'target',
|
||||||
type: 'combo',
|
type: 'combo',
|
||||||
choices: [
|
choices: [
|
||||||
|
'all',
|
||||||
'stm32f1'
|
'stm32f1'
|
||||||
],
|
],
|
||||||
|
value: 'all',
|
||||||
description: 'The hardware platform you wish to target'
|
description: 'The hardware platform you wish to target'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user