mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03:00
build: Simplify cargo target replacement.
This commit is contained in:
parent
59b19f2975
commit
44ebcaaf86
@ -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
|
||||
|
@ -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" \
|
||||
|
Loading…
Reference in New Issue
Block a user