1SHELL = /bin/bash 2 3.PHONY: all 4all: 5 6.PHONY: mem_usage 7mem_usage: 8 9# log and load eventual tee config file 10# path is absolute or relative to current source root directory. 11ifdef CFG_OPTEE_CONFIG 12$(info Loading OPTEE configuration file $(CFG_OPTEE_CONFIG)) 13include $(CFG_OPTEE_CONFIG) 14endif 15 16# If $(PLATFORM) is defined and contains a hyphen, parse it as 17# $(PLATFORM)-$(PLATFORM_FLAVOR) for convenience 18ifneq (,$(findstring -,$(PLATFORM))) 19ops := $(join PLATFORM PLATFORM_FLAVOR,$(addprefix =,$(subst -, ,$(PLATFORM)))) 20$(foreach op,$(ops),$(eval override $(op))) 21endif 22 23# Make these default for now 24ARCH ?= arm 25PLATFORM ?= vexpress 26PLATFORM_FLAVOR ?= qemu_virt 27O ?= out/$(ARCH)-plat-$(PLATFORM) 28 29arch_$(ARCH) := y 30 31ifneq ($O,) 32out-dir := $O 33endif 34 35ifneq ($V,1) 36q := @ 37cmd-echo := true 38cmd-echo-silent := echo 39else 40q := 41cmd-echo := echo 42cmd-echo-silent := true 43endif 44 45ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 46ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) 47cmd-echo-silent := true 48endif 49else # make-3.8x 50ifneq ($(findstring s, $(MAKEFLAGS)),) 51cmd-echo-silent := true 52endif 53endif 54 55 56include core/core.mk 57 58include ta/ta.mk 59 60.PHONY: clean 61clean: 62 @$(cmd-echo-silent) ' CLEAN .' 63 ${q}rm -f $(cleanfiles) 64 65.PHONY: cscope 66cscope: 67 @echo ' CSCOPE .' 68 ${q}rm -f cscope.* 69 ${q}find $(PWD) -name "*.[chSs]" > cscope.files 70 ${q}cscope -b -q -k 71