Commit bcdff822 authored by Daniel Leung's avatar Daniel Leung Committed by Christopher Friedt
Browse files

drivers: sensors: build as static libraries



Instead of putting object files inside libzephyr.a, simply
build a separate static library for the top level of sensor
drivers. Also, for those that were not building its own
static library, make them do so as majority of sensor
drivers are building their own static libraries.

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 378ad046
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ add_subdirectory_ifdef(CONFIG_ITDS wsen_itds)
add_subdirectory_ifdef(CONFIG_MCUX_ACMP		mcux_acmp)
add_subdirectory_ifdef(CONFIG_TACH_NPCX		nuvoton_tach_npcx)

zephyr_sources_ifdef(CONFIG_USERSPACE sensor_handlers.c)
zephyr_sources_ifdef(CONFIG_SENSOR_SHELL sensor_shell.c)
zephyr_sources_ifdef(CONFIG_SENSOR_SHELL_BATTERY shell_battery.c)
zephyr_library()
zephyr_library_sources_ifdef(CONFIG_USERSPACE sensor_handlers.c)
zephyr_library_sources_ifdef(CONFIG_SENSOR_SHELL sensor_shell.c)
zephyr_library_sources_ifdef(CONFIG_SENSOR_SHELL_BATTERY shell_battery.c)
+3 −2
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_GROVE_LIGHT_SENSOR		light_sensor.c)
zephyr_sources_ifdef(CONFIG_GROVE_TEMPERATURE_SENSOR	temperature_sensor.c)
zephyr_library()
zephyr_library_sources_ifdef(CONFIG_GROVE_LIGHT_SENSOR		light_sensor.c)
zephyr_library_sources_ifdef(CONFIG_GROVE_TEMPERATURE_SENSOR	temperature_sensor.c)
+3 −1
Original line number Diff line number Diff line
@@ -3,4 +3,6 @@
#
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_LSM303DLHC_MAGN lsm303dlhc_magn.c)
zephyr_library()

zephyr_library_sources_ifdef(CONFIG_LSM303DLHC_MAGN lsm303dlhc_magn.c)
+3 −1
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: Apache-2.0
#

zephyr_sources(
zephyr_library()

zephyr_library_sources(
	ms5837.c
)