build: Build vkd3d.

CW-Bug-Id: #15810
This commit is contained in:
Zebediah Figura 2021-09-03 17:42:35 -05:00 committed by Arkadiusz Hiler
parent 3b375e5463
commit 0d88b6db78
2 changed files with 60 additions and 5 deletions

View file

@ -783,6 +783,60 @@ $(OBJ)/.dxvk-nvapi-post-build32:
touch $@
##
## vkd3d
##
VKD3D_SOURCE_ARGS = \
--exclude aclocal.m4 \
--exclude autom4te.cache \
--exclude bin/ \
--exclude configure \
--exclude include/config.h.in \
--exclude Makefile.in \
--exclude m4/libtool.m4 \
--exclude m4/ltoptions.m4 \
--exclude m4/ltsugar.m4 \
--exclude m4/ltversion.m4 \
--exclude m4/lt~obsolete.m4 \
VKD3D_CONFIGURE_ARGS = \
--disable-doxygen-doc \
--disable-tests \
--disable-demos \
--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_LDFLAGS32 = -L$(WINE_OBJ32)/dlls/vulkan-1/
VKD3D_LDFLAGS64 = -L$(WINE_OBJ64)/dlls/vulkan-1/
VKD3D_DEPENDS = wine vulkan-headers spirv-headers
$(eval $(call rules-source,vkd3d,$(SRCDIR)/vkd3d))
$(eval $(call rules-autoconf,vkd3d,32))
$(eval $(call rules-autoconf,vkd3d,64))
$(OBJ)/.vkd3d-post-build64:
mkdir -p $(DST_DIR)/lib64/vkd3d/
$(call install-strip,$(VKD3D_DST64)/bin/libvkd3d-shader-1.dll,$(DST_LIBDIR64)/vkd3d)
touch $@
$(OBJ)/.vkd3d-post-build32:
mkdir -p $(DST_DIR)/lib/vkd3d/
$(call install-strip,$(VKD3D_DST32)/bin/libvkd3d-shader-1.dll,$(DST_LIBDIR32)/vkd3d)
touch $@
##
## vkd3d-proton
##

View file

@ -57,10 +57,10 @@ $$(OBJ)/.$(1)-dist$(3):
mkdir -p $$($(2)_LIBDIR$(3))/ $$(DST_LIBDIR$(3))/
cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs $(--verbose?) -0 -r -P$$(J) mkdir -p
cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs $(--verbose?) -0 -r -P$$(J) -n2 cp -a
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
-printf '--only-keep-debug\0%p\0$$(DST_LIBDIR$(3))/%p.debug\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
-printf '--add-gnu-debuglink=$$(DST_LIBDIR$(3))/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n4 objcopy --file-alignment=4096
cd $$($(2)_LIBDIR$(3)) && find -type f -name '*.dll' \
@ -73,9 +73,9 @@ $$(OBJ)/.$(1)-dist$(3):
mkdir -p $$($(2)_LIBDIR$(3))/ $$(DST_LIBDIR$(3))/
cd $$($(2)_LIBDIR$(3)) && find -type f -printf '$$(DST_LIBDIR$(3))/%h\0' | sort -z | uniq -z | xargs $(--verbose?) -0 -r -P$$(J) mkdir -p
cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs $(--verbose?) -0 -r -P$$(J) -n2 cp -a
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
-printf '$$(DST_LIBDIR$(3))/%p.debug\0' | xargs $(--verbose?) -0 -r -P$$(J) rm -f
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.def' ')' \
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \
-printf '--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096
cd $$($(2)_LIBDIR$(3)) && find -type f -name '*.dll' \
@ -124,10 +124,11 @@ $(2)_ENV$(3) = \
LD_LIBRARY_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_LIBDIR$(3))),,:)$$$$LD_LIBRARY_PATH" \
PKG_CONFIG_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_LIBDIR$(3))/pkgconfig))" \
CFLAGS="$$(foreach d,$$($(2)_DEPS$(3)),-I$$($$(d)_INCDIR$(3))) $$($(2)_CFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \
CPPFLAGS="$$(foreach d,$$($(2)_DEPS$(3)),-I$$($$(d)_INCDIR$(3))) $$($(2)_CPPFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \
CXXFLAGS="$$(foreach d,$$($(2)_DEPS$(3)),-I$$($$(d)_INCDIR$(3))) $$($(2)_CXXFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3)) -std=c++17" \
LDFLAGS="$$(foreach d,$$($(2)_DEPS$(3)),-L$$($$(d)_LIBDIR$(3))) \
$$(foreach d,$$($(2)_DEPS$(3)),-Wl,-rpath-link=$$($$(d)_LIBDIR$(3))) \
$$($(2)_LDFLAGS) $$(LDFLAGS)"
$$($(2)_LDFLAGS$(3)) $$($(2)_LDFLAGS) $$(LDFLAGS)"
endef