build: Install builtin libraries to target-arch lib subdirs.

This commit is contained in:
Rémi Bernon 2021-10-01 17:24:17 +02:00 committed by Arkadiusz Hiler
parent 73982eb20f
commit ec2a650072
3 changed files with 13 additions and 7 deletions

View file

@ -181,6 +181,11 @@ PKG_CONFIG_TARGET_64 := x86_64-linux-gnu
PKG_CONFIG_TARGET_CROSS32 := i386-w64-mingw32
PKG_CONFIG_TARGET_CROSS64 := x86_64-w64-mingw32
LIBDIR_WINE_32 := wine/i386-unix
LIBDIR_WINE_64 := wine/x86_64-unix
LIBDIR_WINE_CROSS32 := wine/i386-windows
LIBDIR_WINE_CROSS64 := wine/x86_64-windows
$(OBJ)/.%-post-build32:
touch $@
$(OBJ)/.%-post-build64:

View file

@ -32,9 +32,10 @@ $$(OBJ)/.$(1)-build$(3):
$$(MAKE) -C "$$($(2)_OBJ$(3))" LIBRARIES="$$($(2)_LDFLAGS)"
cd "$$($(2)_OBJ$(3))" && touch "$(basename $(4)).spec" && env $$($(2)_ENV$(3)) \
winebuild --$(lastword $(subst ., ,$(4))) --fake-module -E "$(basename $(4)).spec" -o "$(4).fake"
mkdir -p $$($(2)_DST$(3))/lib$(subst 32,,$(3))/wine/fakedlls/
cp -a $$($(2)_OBJ$(3))/$(4).so $$($(2)_DST$(3))/lib$(subst 32,,$(3))/wine/
cp -a $$($(2)_OBJ$(3))/$(4).fake $$($(2)_DST$(3))/lib$(subst 32,,$(3))/wine/fakedlls/$(4)
mkdir -p $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_$(3))
cp -a $$($(2)_OBJ$(3))/$(4).so $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_$(3))/
mkdir -p $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_CROSS$(3))
cp -a $$($(2)_OBJ$(3))/$(4).fake $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_CROSS$(3))/$(4)
touch $$@
endif
endef