mirror of
https://github.com/suyu-emu/Yucom.git
synced 2026-09-21 13:22:43 -07:00
build: Use build macros for mediaconv.
This commit is contained in:
committed by
Andrew Eikum
parent
cdd4f10b8b
commit
f88ff58f53
@@ -0,0 +1,22 @@
|
||||
# parameters:
|
||||
# $(1): lowercase package name
|
||||
# $(2): uppercase package name
|
||||
# $(3): 32/64, build type
|
||||
#
|
||||
define create-rules-cargo
|
||||
$(call create-rules-common,$(1),$(2),$(3))
|
||||
|
||||
ifeq ($(CONTAINER),1)
|
||||
$(OBJ)/.$(1)-configure$(3):
|
||||
@echo ":: configuring $(3)bit $(1)..." >&2
|
||||
touch $$@
|
||||
|
||||
$(OBJ)/.$(1)-build$(3):
|
||||
@echo ":: building $(3)bit $(1)..." >&2
|
||||
cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \
|
||||
cargo build --target "$$(ARCH$(3))-unknown-linux-gnu" --target-dir $$($(2)_OBJ$(3)) $$(CARGO_BUILD_ARG)
|
||||
touch $$@
|
||||
endif
|
||||
endef
|
||||
|
||||
rules-cargo = $(call create-rules-cargo,$(1),$(call toupper,$(1)),$(2))
|
||||
@@ -57,6 +57,8 @@ all: $(1)
|
||||
|
||||
|
||||
$(2)_ENV$(3) = \
|
||||
CARGO_HOME=$$(OBJ)/.cargo \
|
||||
CARGO_TARGET_$$(call toupper,$$(ARCH$(3))-unknown-linux-gnu)_LINKER="$$(ARCH$(3))-linux-gnu-gcc" \
|
||||
CCACHE_BASEDIR="$$(CCACHE_BASEDIR)" \
|
||||
STRIP="$$(STRIP)" \
|
||||
CC="$$(CCACHE_BIN) $$(ARCH$(3))-linux-gnu-gcc" \
|
||||
|
||||
Reference in New Issue
Block a user