Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/Proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorRĂ©mi Bernon <rbernon@codeweavers.com>2021-11-06 01:40:19 +0300
committerArkadiusz Hiler <ahiler@codeweavers.com>2022-01-19 12:26:04 +0300
commit09568c2159c8aa14589ece4ec773349cd2217729 (patch)
tree948ae00b0fab48d36a25ca8a963cb3dc635d7bb0 /make
parent808b99bd272d67cb754ca68dfd654f0da79a8f31 (diff)
build: Simplify cargo target replacement.
Diffstat (limited to 'make')
-rw-r--r--make/rules-cargo.mk5
-rw-r--r--make/rules-common.mk2
2 files changed, 5 insertions, 2 deletions
diff --git a/make/rules-cargo.mk b/make/rules-cargo.mk
index c5c66633..2dbfe75f 100644
--- a/make/rules-cargo.mk
+++ b/make/rules-cargo.mk
@@ -14,9 +14,12 @@ $$(OBJ)/.$(1)-configure$(3):
$$(OBJ)/.$(1)-build$(3):
@echo ":: building $(3)bit $(1)..." >&2
cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \
- cargo build $$(filter -j%,$$(MAKEFLAGS)) --target "$$(ARCH$(3))-unknown-linux-gnu" --target-dir $$($(2)_OBJ$(3)) $$(CARGO_BUILD_ARG)
+ cargo build $$(filter -j%,$$(MAKEFLAGS)) --target "$$(CARGO_TARGET_$(3))" --target-dir $$($(2)_OBJ$(3)) $$(CARGO_BUILD_ARG)
touch $$@
endif
endef
rules-cargo = $(call create-rules-cargo,$(1),$(call toupper,$(1)),$(2))
+
+CARGO_TARGET_32 := i686-unknown-linux-gnu
+CARGO_TARGET_64 := x86_64-unknown-linux-gnu
diff --git a/make/rules-common.mk b/make/rules-common.mk
index 083655b7..887f3fca 100644
--- a/make/rules-common.mk
+++ b/make/rules-common.mk
@@ -109,7 +109,7 @@ CONTAINERGOALS := $(CONTAINERGOALS) $(filter $(1),$(MAKECMDGOALS))
$(2)_ENV$(3) = \
CARGO_HOME=$$(OBJ)/.cargo \
- CARGO_TARGET_$$(call toupper,$$(ARCH$(3))-unknown-linux-gnu)_LINKER="$$(ARCH$(3))-linux-gnu-gcc" \
+ CARGO_TARGET_$$(call toupper,$$(CARGO_TARGET_$(3)))_LINKER="$$(ARCH$(3))-linux-gnu-gcc" \
CCACHE_BASEDIR="$$(CCACHE_BASEDIR)" \
STRIP="$$(STRIP)" \
CC="$$(CCACHE_BIN) $$(ARCH$(3))-linux-gnu-gcc" \