1include mk/cleanvars.mk 2 3# Set current submodule (used for module specific flags compile result etc) 4sm := core 5sm-$(sm) := y 6 7arch-dir := core/arch/$(ARCH) 8platform-dir := $(arch-dir)/plat-$(PLATFORM) 9include $(platform-dir)/conf.mk 10 11PLATFORM_FLAVOR ?= default 12platform_$(PLATFORM) := y 13platform_flavor_$(PLATFORM_FLAVOR) := y 14cppflags$(sm) += -DPLATFORM_FLAVOR=PLATFORM_FLAVOR_ID_$(PLATFORM_FLAVOR) 15 16cppflags$(sm) += -Icore/include -I$(out-dir)/core/include 17cppflags$(sm) += $(platform-cppflags) $(core-platform-cppflags) 18cflags$(sm) += $(platform-cflags) $(core-platform-cflags) 19aflags$(sm) += $(platform-aflags) $(core-platform-aflags) 20 21# Config flags from mk/config.mk 22cppflags$(sm) += -DCFG_TEE_FW_DEBUG=$(CFG_TEE_FW_DEBUG) 23cppflags$(sm) += -DCFG_TRACE_LEVEL=$(CFG_TEE_CORE_LOG_LEVEL) 24 25cppflags$(sm) += -Ilib/libutee/include 26 27# Tell all libraries and sub-directories (included below) that we have a 28# configuration file 29 30conf-file := $(out-dir)/core/include/generated/conf.h 31cleanfiles += $(conf-file) 32 33include mk/checkconf.mk 34$(conf-file): FORCE 35 $(call check-conf-h) 36 37# 38# Do libraries 39# 40 41# Set a prefix to avoid conflicts with user TAs that will use the same 42# source but with different flags below 43base-prefix := $(sm)- 44libname = utils 45libdir = lib/libutils 46include mk/lib.mk 47 48libname = mpa 49libdir = lib/libmpa 50include mk/lib.mk 51base-prefix := 52 53libname = tomcrypt 54libdir = core/lib/libtomcrypt 55include mk/lib.mk 56 57# 58# Do main source 59# 60subdirs = $(core-platform-subdirs) core 61include mk/subdir.mk 62include mk/compile.mk 63include $(platform-dir)/link.mk 64 65 66