forked from apache/teaclave-trustzone-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (41 loc) · 1.51 KB
/
Copy pathMakefile
File metadata and controls
55 lines (41 loc) · 1.51 KB
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
OPTEE_PATH ?= $(CURDIR)/optee
OPTEE_BUILD_PATH ?= $(OPTEE_PATH)/build
OPTEE_OS_PATH ?= $(OPTEE_PATH)/optee_os
OPTEE_CLIENT_PATH ?= $(OPTEE_PATH)/optee_client
VENDOR ?= qemu_v8.mk
EXAMPLES = $(wildcard examples/*)
EXAMPLES_INSTALL = $(EXAMPLES:%=%-install)
EXAMPLES_CLEAN = $(EXAMPLES:%=%-clean)
ifneq ($(ARCH), arm)
HOST_TARGET := aarch64-unknown-linux-gnu
TA_TARGET := aarch64-unknown-optee-trustzone
else
HOST_TARGET := arm-unknown-linux-gnueabihf
TA_TARGET := arm-unknown-optee-trustzone
endif
all: toolchains optee-os optee-client examples
optee: toolchains optee-os optee-client
toolchains:
make -C $(OPTEE_BUILD_PATH) -f $(VENDOR) toolchains
optee-os:
make -C $(OPTEE_BUILD_PATH) -f $(VENDOR) optee-os
optee-client:
make -C $(OPTEE_BUILD_PATH) -f $(VENDOR) optee-client-common
examples: $(EXAMPLES) toolchains optee-os optee-client
$(EXAMPLES):
make -C $@
examples-install: $(EXAMPLES_INSTALL)
$(EXAMPLES_INSTALL):
install -D $(@:%-install=%)/host/target/$(HOST_TARGET)/release/$(@:examples/%-install=%) -t out/host/
install -D $(@:%-install=%)/ta/target/$(TA_TARGET)/release/*.ta -t out/ta/
optee-os-clean:
make -C $(OPTEE_OS_PATH) O=out/arm clean
optee-client-clean:
make -C $(OPTEE_BUILD_PATH) -f $(VENDOR) optee-client-clean-common
examples-clean: $(EXAMPLES_CLEAN) out-clean
$(EXAMPLES_CLEAN):
make -C $(@:-clean=) clean
out-clean:
rm -rf out
.PHONY: clean optee-os-clean optee-client-clean $(EXAMPLES) $(EXAMPLES_CLEAN)
clean: optee-os-clean optee-client-clean $(EXAMPLES_CLEAN)