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 17cppflags$(sm) += -include $(out-dir)/core/include/generated/conf.h 18cppflags$(sm) += $(platform-cppflags) $(core-platform-cppflags) 19cflags$(sm) += $(platform-cflags) $(core-platform-cflags) 20aflags$(sm) += $(platform-aflags) $(core-platform-aflags) 21 22# Config flags from mk/config.mk 23cppflags$(sm) += -DCFG_TEE_FW_DEBUG=$(CFG_TEE_FW_DEBUG) 24cppflags$(sm) += -DCFG_TRACE_LEVEL=$(CFG_TEE_CORE_LOG_LEVEL) 25 26cppflags$(sm) += -Ilib/libutee/include 27 28# Tell all libraries and sub-directories (included below) that we have a 29# configuration file 30 31conf-file := $(out-dir)/core/include/generated/conf.h 32cleanfiles += $(conf-file) 33 34include mk/checkconf.mk 35$(conf-file): FORCE 36 $(call check-conf-h) 37 38# 39# Do libraries 40# 41 42# Set a prefix to avoid conflicts with user TAs that will use the same 43# source but with different flags below 44base-prefix := $(sm)- 45libname = utils 46libdir = lib/libutils 47include mk/lib.mk 48 49libname = mpa 50libdir = lib/libmpa 51include mk/lib.mk 52base-prefix := 53 54libname = tomcrypt 55libdir = core/lib/libtomcrypt 56include mk/lib.mk 57 58# 59# Do main source 60# 61subdirs = $(core-platform-subdirs) core 62include mk/subdir.mk 63include mk/compile.mk 64include $(platform-dir)/link.mk 65 66 67