build: Build vkd3d-shader with cross-compilation rules.

This commit is contained in:
Rémi Bernon 2021-11-12 11:28:45 +01:00 committed by Arkadiusz Hiler
parent 587f86fb9d
commit 04bf8f150e
2 changed files with 6 additions and 15 deletions

View file

@ -801,17 +801,6 @@ VKD3D_CONFIGURE_ARGS = \
--disable-tests \ --disable-tests \
--disable-demos \ --disable-demos \
--without-ncurses \ --without-ncurses \
WIDL=$(WINE_OBJ64)/tools/widl/widl
VKD3D_CONFIGURE_ARGS32 = \
--host=i686-w64-mingw32 \
CC="$(CCACHE_BIN) i686-w64-mingw32-gcc" \
LD="i686-w64-mingw32-ld" \
VKD3D_CONFIGURE_ARGS64 = \
--host=x86_64-w64-mingw32 \
CC="$(CCACHE_BIN) x86_64-w64-mingw32-gcc" \
LD="x86_64-w64-mingw32-ld" \
VKD3D_LDFLAGS = -static-libgcc $(CROSSLDFLAGS) VKD3D_LDFLAGS = -static-libgcc $(CROSSLDFLAGS)
VKD3D_LDFLAGS32 = -L$(WINE_OBJ32)/dlls/vulkan-1/ VKD3D_LDFLAGS32 = -L$(WINE_OBJ32)/dlls/vulkan-1/
@ -820,8 +809,8 @@ VKD3D_LDFLAGS64 = -L$(WINE_OBJ64)/dlls/vulkan-1/
VKD3D_DEPENDS = wine vulkan-headers spirv-headers VKD3D_DEPENDS = wine vulkan-headers spirv-headers
$(eval $(call rules-source,vkd3d,$(SRCDIR)/vkd3d)) $(eval $(call rules-source,vkd3d,$(SRCDIR)/vkd3d))
$(eval $(call rules-autoconf,vkd3d,32)) $(eval $(call rules-autoconf,vkd3d,32,CROSS))
$(eval $(call rules-autoconf,vkd3d,64)) $(eval $(call rules-autoconf,vkd3d,64,CROSS))
$(OBJ)/.vkd3d-post-build64: $(OBJ)/.vkd3d-post-build64:
mkdir -p $(DST_DIR)/lib64/vkd3d/ mkdir -p $(DST_DIR)/lib64/vkd3d/

View file

@ -2,9 +2,10 @@
# $(1): lowercase package name # $(1): lowercase package name
# $(2): uppercase package name # $(2): uppercase package name
# $(3): 32/64, build type # $(3): 32/64, build type
# $(4): CROSS/<empty>, cross compile
# #
define create-rules-autoconf define create-rules-autoconf
$(call create-rules-common,$(1),$(2),$(3)) $(call create-rules-common,$(1),$(2),$(3),$(4))
ifeq ($(CONTAINER),1) ifeq ($(CONTAINER),1)
$$(OBJ)/.$(1)-pre-configure: $$($(2)_SRC)/configure.ac $$(OBJ)/.$(1)-pre-configure: $$($(2)_SRC)/configure.ac
@ -20,6 +21,7 @@ $$(OBJ)/.$(1)-configure$(3): $$(OBJ)/.$(1)-pre-configure
$$($(2)_SRC)/configure $(--quiet?) -C \ $$($(2)_SRC)/configure $(--quiet?) -C \
--prefix="$$($(2)_DST$(3))" \ --prefix="$$($(2)_DST$(3))" \
--libdir="$$($(2)_DST$(3))/lib$(subst 32,,$(3))" \ --libdir="$$($(2)_DST$(3))/lib$(subst 32,,$(3))" \
--host="$$(TARGET_$(4)$(3))" \
$$($(2)_ENV$(3)) \ $$($(2)_ENV$(3)) \
$$($(2)_CONFIGURE_ARGS) \ $$($(2)_CONFIGURE_ARGS) \
$$($(2)_CONFIGURE_ARGS$(3)) $$($(2)_CONFIGURE_ARGS$(3))
@ -36,4 +38,4 @@ $$(OBJ)/.$(1)-build$(3):
endif endif
endef endef
rules-autoconf = $(call create-rules-autoconf,$(1),$(call toupper,$(1)),$(2)) rules-autoconf = $(call create-rules-autoconf,$(1),$(call toupper,$(1)),$(2),$(3))