xref: /optee_os/Makefile (revision 8a1e7b89e2b0762a622c8237d489cf9afc60c1da)
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            ?= arm32
25PLATFORM        ?= stm
26O		?= out/$(ARCH)-plat-$(PLATFORM)
27
28arch_$(ARCH)	:= y
29
30ifneq ($O,)
31out-dir := $O
32endif
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:
48	@echo '  CLEAN   .'
49	${q}rm -f $(cleanfiles)
50
51.PHONY: cscope
52cscope:
53	@echo '  CSCOPE  .'
54	${q}rm -f cscope.*
55	${q}find $(PWD) -name "*.[chSs]" > cscope.files
56	${q}cscope -b -q -k
57