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