Skip to content

Commit

Permalink
Unify env variables
Browse files Browse the repository at this point in the history
TA and host reads the TARGET_* and CROSS_COMPILE_* correspondingly,
which can be set by `source environment` (recommended), if not set,
the Makefile takes default values.
  • Loading branch information
DemesneGH committed Jul 9, 2024
1 parent a25a679 commit 3b4d2c6
Show file tree
Hide file tree
Showing 41 changed files with 101 additions and 91 deletions.
8 changes: 4 additions & 4 deletions examples/acipher-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
6 changes: 3 additions & 3 deletions examples/acipher-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@

NAME := acipher-rs

TARGET ?= aarch64-unknown-linux-gnu
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release


all: host strip

host:
@cargo build --target $(TARGET) --release --config $(LINKER_CFG)
@cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG)

strip: host
@$(OBJCOPY) --strip-unneeded $(OUT_DIR)/$(NAME) $(OUT_DIR)/$(NAME)
Expand Down
4 changes: 2 additions & 2 deletions examples/acipher-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

UUID ?= $(shell cat "../uuid.txt")

TARGET_TA ?= $(TARGET)
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/aes-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/aes-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := aes-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 3 additions & 1 deletion examples/aes-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

UUID ?= $(shell cat "../uuid.txt")

CROSS_COMPILE_TA ?= aarch64-linux-gnu-
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/authentication-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/authentication-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := authentication-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 3 additions & 1 deletion examples/authentication-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

UUID ?= $(shell cat "../uuid.txt")

CROSS_COMPILE_TA ?= aarch64-linux-gnu-
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/big_int-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/big_int-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := big_int-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 3 additions & 1 deletion examples/big_int-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

UUID ?= $(shell cat "../uuid.txt")

CROSS_COMPILE_TA ?= aarch64-linux-gnu-
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/diffie_hellman-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/diffie_hellman-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := diffie_hellman-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 2 additions & 2 deletions examples/diffie_hellman-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

UUID ?= $(shell cat "../uuid.txt")

TARGET_TA ?= $(TARGET)
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/digest-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/digest-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := digest-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 2 additions & 2 deletions examples/digest-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

UUID ?= $(shell cat "../uuid.txt")

TARGET_TA ?= $(TARGET)
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/error_handling-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/error_handling-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := error_handling-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 3 additions & 1 deletion examples/error_handling-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

UUID ?= $(shell cat "../uuid.txt")

CROSS_COMPILE_TA ?= aarch64-linux-gnu-
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/hello_world-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := hello_world-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 2 additions & 2 deletions examples/hello_world-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

UUID ?= $(shell cat "../uuid.txt")

TARGET_TA ?= $(TARGET)
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/hotp-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/hotp-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := hotp-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 2 additions & 2 deletions examples/hotp-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

UUID ?= $(shell cat "../uuid.txt")

TARGET_TA ?= $(TARGET)
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/random-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
2 changes: 1 addition & 1 deletion examples/random-rs/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NAME := random-rs
TARGET_HOST ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_HOST ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_HOST)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_HOST)gcc\"
LINKER_CFG := target.$(TARGET_HOST).linker=\"$(CROSS_COMPILE_HOST)gcc\"

OUT_DIR := $(CURDIR)/target/$(TARGET_HOST)/release

Expand Down
4 changes: 2 additions & 2 deletions examples/random-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

UUID ?= $(shell cat "../uuid.txt")

TARGET_TA ?= $(TARGET)
TARGET_TA ?= aarch64-unknown-linux-gnu
CROSS_COMPILE_TA ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE_TA)objcopy
LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand Down
8 changes: 4 additions & 4 deletions examples/secure_storage-rs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)

all:
$(q)make -C host TARGET=$(TARGET_HOST) \
CROSS_COMPILE=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET=$(TARGET_TA) \
CROSS_COMPILE=$(CROSS_COMPILE_TA)
$(q)make -C host TARGET_HOST=$(TARGET_HOST) \
CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST)
$(q)make -C ta TARGET_TA=$(TARGET_TA) \
CROSS_COMPILE_TA=$(CROSS_COMPILE_TA)

clean:
$(q)make -C host clean
Expand Down
Loading

0 comments on commit 3b4d2c6

Please sign in to comment.