blob: b8c6866262a72892e779d73aada2d5d9a314b839 [file] [log] [blame]
Pascal Brandb0104772014-06-12 15:56:20 +02001SHELL = /bin/bash
2
3.PHONY: all
4all:
5
Jens Wiklander29f1a452014-08-29 08:26:57 +02006.PHONY: mem_usage
7mem_usage:
8
etienne carrieredde0e232015-02-26 10:29:27 +01009# 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
Jerome Forissier71767a52014-10-29 14:43:11 +010016# 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
Pascal Brandb0104772014-06-12 15:56:20 +020023# Make these default for now
24ARCH ?= arm32
Pascal Brand92542a72014-08-29 10:50:38 +020025PLATFORM ?= stm
Pascal Brandb0104772014-06-12 15:56:20 +020026O ?= out/$(ARCH)-plat-$(PLATFORM)
27
28arch_$(ARCH) := y
29
Pascal Brandb0104772014-06-12 15:56:20 +020030ifneq ($O,)
Jerome Forissier4334e8d2014-09-08 10:53:42 +020031out-dir := $O
Pascal Brandb0104772014-06-12 15:56:20 +020032endif
33
34ifneq ($V,1)
35q := @
36cmd-echo := true
37else
38q :=
39cmd-echo := echo
40endif
41
42include core/core.mk
43
44include ta/ta.mk
45
46.PHONY: clean
47clean:
Jerome Forissier0047cb62014-09-01 13:41:48 +020048 @echo ' CLEAN .'
Pascal Brandb0104772014-06-12 15:56:20 +020049 ${q}rm -f $(cleanfiles)
50
51.PHONY: cscope
52cscope:
Jerome Forissier0047cb62014-09-01 13:41:48 +020053 @echo ' CSCOPE .'
Pascal Brandb0104772014-06-12 15:56:20 +020054 ${q}rm -f cscope.*
55 ${q}find $(PWD) -name "*.[chSs]" > cscope.files
56 ${q}cscope -b -q -k