zephyr/ext/hal/qmsi/Makefile
Iván Briano f6eb05d1d9 ext hal qmsi: Avoid QMSI specific flags when QMSI is not used
The way the build system works, the Makefiles under ext/hal/* are being
included unconditionally, so anything they add to the build flags needs
to be protected by the correct configuration value.

Change-Id: I238e04cd836dd9e4c5d83040822039c68abb6b17
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-11-16 13:57:05 -02:00

30 lines
754 B
Makefile

ifdef CONFIG_QMSI
KBUILD_CPPFLAGS +=-DENABLE_EXTERNAL_ISR_HANDLING
ifdef CONFIG_QMSI_LIBRARY
ZEPHYRINCLUDE += -I$(CONFIG_QMSI_INSTALL_PATH)/include
LIB_INCLUDE_DIR += -L$(CONFIG_QMSI_INSTALL_PATH:"%"=%)/lib
ALL_LIBS += qmsi
endif
ifdef CONFIG_QMSI_BUILTIN
ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/qmsi/include
ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/qmsi/drivers/include
ifeq ($(CONFIG_ARC),y)
ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/qmsi/drivers/sensor/include
endif
ZEPHYRINCLUDE +=-I$(srctree)/ext/hal/qmsi/soc/$(patsubst %_ss,%,$(SOC_SERIES))/include/
endif
ifdef CONFIG_SYS_POWER_DEEP_SLEEP
KBUILD_CPPFLAGS +=-DENABLE_RESTORE_CONTEXT
endif
SOC_WATCH_ENABLE ?= 0
ifeq ($(CONFIG_SOC_WATCH),y)
SOC_WATCH_ENABLE := 1
CFLAGS += -DSOC_WATCH_ENABLE
endif
endif