diff --git a/Makefile.in b/Makefile.in index 08875724..521fa1f1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,6 +14,9 @@ MFLAGS += V=1 VERBOSE=1 endif SHELL := /bin/bash +ARCHS := i386-unix x86_64-unix i386-windows x86_64-windows +unix_ARCHS = $(subst -unix,,$(filter %-unix,$(ARCHS))) +windows_ARCHS = $(subst -windows,,$(filter %-windows,$(ARCHS))) ## ## General/global config @@ -427,11 +430,15 @@ WINE_AUTOCONF_ARGS = \ --with-mingw \ --disable-tests -WINE_i386_AUTOCONF_ARGS = \ +WINE_x86_64_AUTOCONF_ARGS = \ + --enable-archs="x86_64 $(filter-out x86_64 $(unix_ARCHS),$(windows_ARCHS))" \ + --enable-win64 \ + +WINE_i386_AUTOCONF_ARGS += \ VKD3D_PE_CFLAGS="-I$(VULKAN_HEADERS_i386_DST)/include -I$(VKD3D_i386_DST)/include/vkd3d" \ VKD3D_PE_LIBS="-L$(VKD3D_i386_LIBDIR)/vkd3d/i386-windows -l:libvkd3d-1.dll -l:libvkd3d-shader-1.dll" -WINE_x86_64_AUTOCONF_ARGS = --enable-win64 \ +WINE_x86_64_AUTOCONF_ARGS += \ VKD3D_PE_CFLAGS="-I$(VULKAN_HEADERS_x86_64_DST)/include -I$(VKD3D_x86_64_DST)/include/vkd3d" \ VKD3D_PE_LIBS="-L$(VKD3D_x86_64_LIBDIR)/vkd3d/x86_64-windows -l:libvkd3d-1.dll -l:libvkd3d-shader-1.dll" @@ -452,12 +459,22 @@ $(OBJ)/.wine-post-source: touch $@ $(OBJ)/.wine-x86_64-post-build: - mkdir -p $(DST_DIR)/{bin,share} +ifeq ($(findstring i386,$(unix_ARCHS)),) + mkdir -p $(DST_DIR)/bin + $(call install-strip,$(WINE_x86_64_DST)/bin/wine,$(DST_DIR)/bin) + $(call install-strip,$(WINE_x86_64_DST)/bin/wine-preloader,$(DST_DIR)/bin) + $(call install-strip,$(WINE_x86_64_DST)/bin/wineserver,$(DST_DIR)/bin) + cp -a $(WINE_x86_64_DST)/bin/msidb $(DST_DIR)/bin/ +else + mkdir -p $(DST_DIR)/bin $(call install-strip,$(WINE_x86_64_DST)/bin/wine64,$(DST_DIR)/bin) $(call install-strip,$(WINE_x86_64_DST)/bin/wine64-preloader,$(DST_DIR)/bin) $(call install-strip,$(WINE_x86_64_DST)/bin/wineserver,$(DST_DIR)/bin) - cp -a $(WINE_x86_64_DST)/share/wine $(DST_DIR)/share cp -a $(WINE_x86_64_DST)/bin/msidb $(DST_DIR)/bin +endif + + mkdir -p $(DST_DIR)/share + cp -a $(WINE_x86_64_DST)/share/wine $(DST_DIR)/share touch $@ $(OBJ)/.wine-i386-post-build: diff --git a/make/rules-autoconf.mk b/make/rules-autoconf.mk index 49180556..ae88fbcb 100644 --- a/make/rules-autoconf.mk +++ b/make/rules-autoconf.mk @@ -6,6 +6,7 @@ # define create-rules-autoconf $(call create-rules-common,$(1),$(2),$(3),$(4)) +ifneq ($(findstring $(3)-$(4),$(ARCHS)),) $$($(2)_SRC)/configure: $$($(2)_ORIGIN)/configure.ac | $$(OBJ)/.$(1)-post-source @echo ":: autoreconfing $(1)..." >&2 @@ -34,6 +35,8 @@ $$(OBJ)/.$(1)-$(3)-build: cd "$$($(2)_$(3)_OBJ)" && env $$($(2)_$(3)_ENV) \ $$(MAKE) install touch $$@ + +endif endef rules-autoconf = $(call create-rules-autoconf,$(1),$(call toupper,$(1)),$(2),$(3)) diff --git a/make/rules-cargo.mk b/make/rules-cargo.mk index 7f56b330..a8532cb7 100644 --- a/make/rules-cargo.mk +++ b/make/rules-cargo.mk @@ -6,6 +6,7 @@ # define create-rules-cargo $(call create-rules-common,$(1),$(2),$(3),$(4)) +ifneq ($(findstring $(3)-$(4),$(ARCHS)),) $$(OBJ)/.$(1)-$(3)-configure: @echo ":: configuring $(1)-$(3)..." >&2 @@ -21,6 +22,7 @@ $$(OBJ)/.$(1)-$(3)-build: $$($(2)_CARGO_ARGS) \ $$($(2)_$(3)_CARGO_ARGS) touch $$@ +endif endef rules-cargo = $(call create-rules-cargo,$(1),$(call toupper,$(1)),$(2),$(3)) diff --git a/make/rules-cmake.mk b/make/rules-cmake.mk index 2b6ac4b3..d75de57c 100644 --- a/make/rules-cmake.mk +++ b/make/rules-cmake.mk @@ -6,6 +6,7 @@ # define create-rules-cmake $(call create-rules-common,$(1),$(2),$(3),$(4)) +ifneq ($(findstring $(3)-$(4),$(ARCHS)),) $$($(2)_SRC)/CMakeLists.txt: | $$(OBJ)/.$(1)-post-source $$(OBJ)/.$(1)-$(3)-configure: $$($(2)_SRC)/CMakeLists.txt @@ -30,6 +31,7 @@ $$(OBJ)/.$(1)-$(3)-build: cd "$$($(2)_$(3)_OBJ)" && env $$($(2)_$(3)_ENV) \ $$(MAKE) install touch $$@ +endif endef i386-unix_CMAKE_ARGS := -DCMAKE_SHARED_LIBRARY_PREFIX_C=lib -DCMAKE_IMPORT_LIBRARY_PREFIX_C=lib diff --git a/make/rules-common.mk b/make/rules-common.mk index 5500e3f0..9cb5dcdc 100644 --- a/make/rules-common.mk +++ b/make/rules-common.mk @@ -43,6 +43,15 @@ all-build: $(1)-build .PHONY: all-build +ifeq ($$(findstring $(3)-$(4),$$(ARCHS)),) +$$(OBJ)/.$(1)-$(3)-configure: + touch $$@ +$$(OBJ)/.$(1)-$(3)-build: + touch $$@ +$$(OBJ)/.$(1)-$(3)-dist: + touch $$@ +else + $$(OBJ)/.$(1)-$(3)-dist: $$(OBJ)/.$(1)-$(3)-build $$(OBJ)/.$(1)-$(3)-dist: $$(OBJ)/.$(1)-$(3)-post-build @@ -74,6 +83,8 @@ else touch $$@ endif +endif + $(1)-$(3)-dist: $$(OBJ)/.$(1)-$(3)-dist .INTERMEDIATE: $(1)-$(3)-dist diff --git a/make/rules-configure.mk b/make/rules-configure.mk index e2f405fb..2e9e0416 100644 --- a/make/rules-configure.mk +++ b/make/rules-configure.mk @@ -6,6 +6,7 @@ # define create-rules-configure $(call create-rules-common,$(1),$(2),$(3),$(4)) +ifneq ($(findstring $(3)-$(4),$(ARCHS)),) $$(OBJ)/.$(1)-$(3)-configure: @echo ":: configuring $(1)-$(3)..." >&2 @@ -28,6 +29,7 @@ $$(OBJ)/.$(1)-$(3)-build: cd "$$($(2)_$(3)_OBJ)" && env $$($(2)_$(3)_ENV) \ $$(MAKE) install touch $$@ +endif endef i386-unix_CONFIGURE_ARGS := --arch=x86 --target-os=linux diff --git a/make/rules-makedep.mk b/make/rules-makedep.mk index 02bb0cbd..529439d5 100644 --- a/make/rules-makedep.mk +++ b/make/rules-makedep.mk @@ -5,6 +5,7 @@ # define create-rules-makedep $(call create-rules-common,$(1),$(2),$(3),unix) +ifneq ($(findstring $(3)-unix,$(ARCHS)),) $$(OBJ)/.$(1)-$(3)-configure: @echo ":: configuring $(1)-$(3)..." >&2 @@ -49,6 +50,7 @@ $$(OBJ)/.$(1)-$(3)-build: cd "$$($(2)_$(3)_OBJ)" && env $$($(2)_$(3)_ENV) \ $$(MAKE) install touch $$@ +endif endef rules-makedep = $(call create-rules-makedep,$(1),$(call toupper,$(1)),$(2)) diff --git a/make/rules-meson.mk b/make/rules-meson.mk index 995da1a2..063197ce 100644 --- a/make/rules-meson.mk +++ b/make/rules-meson.mk @@ -6,6 +6,7 @@ # define create-rules-meson $(call create-rules-common,$(1),$(2),$(3),$(4)) +ifneq ($(findstring $(3)-$(4),$(ARCHS)),) define $(2)_$(3)_MESON_CROSS cat <