ext: include headers based on HAL being used
For CMSIS we now have HAS_CMSIS which needs to be added to the SoC definition. Instead of changing the main Makefile we now include a sub-Makefile with all related header and library paths that are hosted in ext/ Move redifintion of LIB_INCLUDE_DIR later to get variables defined in Makefile.toolchain.* Change-Id: I9f90f90247c2a66b4565427b89d4e1d4dd5c9622 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
a3a8828af3
commit
37b1d1eb55
11 changed files with 65 additions and 31 deletions
3
ext/Makefile
Normal file
3
ext/Makefile
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
|
||||
include $(srctree)/ext/hal/Makefile
|
1
ext/hal/Kbuild
Normal file
1
ext/hal/Kbuild
Normal file
|
@ -0,0 +1 @@
|
|||
obj-$(CONFIG_QMSI_BUILTIN) += qmsi/
|
|
@ -16,8 +16,12 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
# When adding new entries keep the list in alphabetical order
|
||||
|
||||
menu "HALs"
|
||||
|
||||
source "ext/hal/cmsis/Kconfig"
|
||||
|
||||
source "ext/hal/qmsi/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
obj-$(CONFIG_QMSI_BUILTIN) += qmsi/
|
||||
|
||||
include $(srctree)/ext/hal/qmsi/Makefile
|
||||
|
||||
include $(srctree)/ext/hal/cmsis/Makefile
|
||||
|
|
18
ext/hal/cmsis/Kconfig
Normal file
18
ext/hal/cmsis/Kconfig
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (c) 2016 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
config HAS_CMSIS
|
||||
bool
|
4
ext/hal/cmsis/Makefile
Normal file
4
ext/hal/cmsis/Makefile
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
ifdef CONFIG_HAS_CMSIS
|
||||
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/cmsis/Include
|
||||
endif
|
24
ext/hal/qmsi/Kbuild
Normal file
24
ext/hal/qmsi/Kbuild
Normal file
|
@ -0,0 +1,24 @@
|
|||
subdir-ccflags-$(CONFIG_QMSI_BUILTIN) +=-DISR_HANDLED
|
||||
|
||||
include $(srctree)/ext/hal/qmsi/Makefile.include
|
||||
|
||||
obj-$(CONFIG_QMSI_BUILTIN) += drivers/clk.o
|
||||
ifeq ($(CONFIG_ARC),y)
|
||||
obj-$(CONFIG_QMSI_BUILTIN) += drivers/sensor/ss_clk.o
|
||||
endif
|
||||
obj-$(CONFIG_RTC_QMSI) += drivers/qm_rtc.o
|
||||
obj-$(CONFIG_WDT_QMSI) += drivers/qm_wdt.o
|
||||
obj-$(CONFIG_I2C_QMSI) += drivers/qm_i2c.o
|
||||
obj-$(CONFIG_PWM_QMSI) += drivers/qm_pwm.o
|
||||
obj-$(CONFIG_AIO_COMPARATOR_QMSI) += drivers/qm_comparator.o
|
||||
obj-$(CONFIG_AON_COUNTER_QMSI) += drivers/qm_aon_counters.o
|
||||
obj-$(CONFIG_GPIO_QMSI) += drivers/qm_gpio.o
|
||||
obj-$(CONFIG_ADC_QMSI) += drivers/qm_adc.o
|
||||
obj-$(CONFIG_UART_QMSI) += drivers/qm_uart.o
|
||||
obj-$(CONFIG_SPI_QMSI) += drivers/qm_spi.o
|
||||
obj-$(CONFIG_SOC_FLASH_QMSI) += drivers/qm_flash.o
|
||||
obj-$(CONFIG_PINMUX_DEV_QMSI) += drivers/qm_pinmux.o
|
||||
obj-$(CONFIG_SPI_QMSI_SS) += drivers/sensor/qm_ss_spi.o
|
||||
obj-$(CONFIG_GPIO_QMSI_SS) += drivers/sensor/qm_ss_gpio.o
|
||||
obj-$(CONFIG_I2C_QMSI_SS) += drivers/sensor/qm_ss_i2c.o
|
||||
obj-$(CONFIG_ADC_QMSI_SS) += drivers/sensor/qm_ss_adc.o
|
|
@ -1,23 +1,5 @@
|
|||
subdir-ccflags-$(CONFIG_QMSI_BUILTIN) +=-DISR_HANDLED
|
||||
include $(srctree)/ext/hal/qmsi/Makefile.include
|
||||
|
||||
obj-$(CONFIG_QMSI_BUILTIN) += drivers/clk.o
|
||||
ifeq ($(CONFIG_ARC),y)
|
||||
obj-$(CONFIG_QMSI_BUILTIN) += drivers/sensor/ss_clk.o
|
||||
ifdef CONFIG_QMSI_LIBRARY
|
||||
LIB_INCLUDE_DIR += -L$(CONFIG_QMSI_INSTALL_PATH:"%"=%)/lib
|
||||
ALL_LIBS += qmsi
|
||||
endif
|
||||
obj-$(CONFIG_RTC_QMSI) += drivers/qm_rtc.o
|
||||
obj-$(CONFIG_WDT_QMSI) += drivers/qm_wdt.o
|
||||
obj-$(CONFIG_I2C_QMSI) += drivers/qm_i2c.o
|
||||
obj-$(CONFIG_PWM_QMSI) += drivers/qm_pwm.o
|
||||
obj-$(CONFIG_AIO_COMPARATOR_QMSI) += drivers/qm_comparator.o
|
||||
obj-$(CONFIG_AON_COUNTER_QMSI) += drivers/qm_aon_counters.o
|
||||
obj-$(CONFIG_GPIO_QMSI) += drivers/qm_gpio.o
|
||||
obj-$(CONFIG_ADC_QMSI) += drivers/qm_adc.o
|
||||
obj-$(CONFIG_UART_QMSI) += drivers/qm_uart.o
|
||||
obj-$(CONFIG_SPI_QMSI) += drivers/qm_spi.o
|
||||
obj-$(CONFIG_SOC_FLASH_QMSI) += drivers/qm_flash.o
|
||||
obj-$(CONFIG_PINMUX_DEV_QMSI) += drivers/qm_pinmux.o
|
||||
obj-$(CONFIG_SPI_QMSI_SS) += drivers/sensor/qm_ss_spi.o
|
||||
obj-$(CONFIG_GPIO_QMSI_SS) += drivers/sensor/qm_ss_gpio.o
|
||||
obj-$(CONFIG_I2C_QMSI_SS) += drivers/sensor/qm_ss_i2c.o
|
||||
obj-$(CONFIG_ADC_QMSI_SS) += drivers/sensor/qm_ss_adc.o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue