2018-08-21 03:11:58 +03:00
##
## Nested make
##
2018-11-16 15:51:17 +03:00
SHELL := /bin/bash
2018-08-21 03:11:58 +03:00
i f n e q ( $( NO_NESTED_MAKE ) , 1 )
# Pass all variables/goals to ourselves as a sub-make such that we will get a trailing error message upon failure. (We
# invoke a lot of long-running build-steps, and make fails to re-print errors when they happened ten thousand lines
# ago.)
export
.DEFAULT_GOAL := default
.PHONY : $( MAKECMDGOALS ) default nested_make
default $(MAKECMDGOALS) : nested_make
nested_make :
2018-10-17 17:54:49 +03:00
+$( MAKE) $( MAKECMDGOALS) -f $( firstword $( MAKEFILE_LIST) ) NO_NESTED_MAKE = 1
2018-08-21 03:11:58 +03:00
e l s e # (Rest of the file is the else)
##
## General/global config
##
# We expect the configure script to conditionally set the following:
# SRCDIR - Path to source
# BUILD_NAME - Name of the build for manifests etc.
# NO_DXVK - 1 if skipping DXVK steps
# WITH_FFMPEG - 1 if including ffmpeg steps
# STEAMRT64_MODE - 'docker' or '' for automatic Steam Runtime container
# STEAMRT64_IMAGE - Name of the image if mode is set
# STEAMRT32_MODE - Same as above for 32-bit container (can be different type)
# STEAMRT32_IMAGE - Same as above for 32-bit container
2019-02-05 18:41:03 +03:00
# STEAMRT_PATH - Path to built runtime which contains run.sh
2018-08-21 03:11:58 +03:00
i f e q ( $( SRCDIR ) , )
foo := $( error SRCDIR not set, do not include makefile_base directly, run ./configure.sh to generate Makefile)
e n d i f
# If CC is coming from make's defaults or nowhere, use our own default. Otherwise respect environment.
i f n e q ( $( filter default undefined ,$ ( origin CC ) ) , )
2018-10-12 16:13:56 +03:00
# CC = ccache gcc
CC = gcc
2018-08-21 03:11:58 +03:00
e n d i f
i f n e q ( $( filter default undefined ,$ ( origin CXX ) ) , )
2018-10-12 16:13:56 +03:00
# CXX = ccache g++
CXX = g++
2018-08-21 03:11:58 +03:00
e n d i f
export CC
export CXX
2018-10-18 00:27:24 +03:00
cc-option = $( shell if test -z " `echo 'void*p=1;' | \
$( 1) $( 2) -S -o /dev/null -xc - 2>& 1 | grep -- $( 2) -` " ; \
then echo " $( 2) " ; else echo " $( 3) " ; fi ; )
2018-08-21 03:11:58 +03:00
# Selected container mode shell
2019-06-24 17:32:26 +03:00
DOCKER_SHELL_BASE = docker run --rm --init --privileged --cap-add= SYS_ADMIN --security-opt apparmor:unconfined \
-v $( HOME) :$( HOME) -v /tmp:/tmp \
-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /etc/shadow:/etc/shadow:ro \
-w $( CURDIR) -e HOME = $( HOME) -e PATH = $( PATH) -u $( shell id -u) :$( shell id -g) -h $( shell hostname) \
$( DOCKER_OPTS) \
2019-07-23 16:01:38 +03:00
$( SELECT_DOCKER_IMAGE) /sbin/docker-init -sg -- /bin/bash
2018-08-21 03:11:58 +03:00
# If STEAMRT64_MODE/STEAMRT32_MODE is set, set the nested SELECT_DOCKER_IMAGE to the _IMAGE variable and eval
# DOCKER_SHELL_BASE with it to create the CONTAINER_SHELL setting.
i f e q ( $( STEAMRT 64_MODE ) , d o c k e r )
SELECT_DOCKER_IMAGE := $( STEAMRT64_IMAGE)
CONTAINER_SHELL64 := $( DOCKER_SHELL_BASE)
e l s e i f n e q ( $( STEAMRT 64_MODE ) , )
foo := $( error Unrecognized STEAMRT64_MODE $( STEAMRT64_MODE) )
e n d i f
i f e q ( $( STEAMRT 32_MODE ) , d o c k e r )
SELECT_DOCKER_IMAGE := $( STEAMRT32_IMAGE)
CONTAINER_SHELL32 := $( DOCKER_SHELL_BASE)
e l s e i f n e q ( $( STEAMRT 32_MODE ) , )
foo := $( error Unrecognized STEAMRT32_MODE $( STEAMRT32_MODE) )
e n d i f
2019-02-05 18:41:03 +03:00
i f n e q ( $( STEAMRT_PATH ) , )
STEAM_RUNTIME_RUNSH := $( STEAMRT_PATH) /run.sh
e l s e
STEAM_RUNTIME_RUNSH :=
e n d i f
2018-08-21 03:11:58 +03:00
SELECT_DOCKER_IMAGE :=
# If we're using containers to sub-invoke the various builds, jobserver won't work, have some silly auto-jobs
# controllable by SUBMAKE_JOBS. Not ideal.
i f n e q ( $( CONTAINER_SHELL 32) $( CONTAINER_SHELL 64) , )
2019-05-07 22:23:06 +03:00
SUBMAKE_JOBS ?= 36
2018-08-21 03:11:58 +03:00
MAKE := make -j$( SUBMAKE_JOBS)
e n d i f
# Use default shell if no STEAMRT_ variables setup a container to invoke. Commands will just run natively.
i f n d e f C O N T A I N E R _ S H E L L 6 4
CONTAINER_SHELL64 := $( SHELL)
e n d i f
i f n d e f C O N T A I N E R _ S H E L L 3 2
CONTAINER_SHELL32 := $( SHELL)
e n d i f
# Helper to test
.PHONY : test -container test -container 32 test -container 64
test-container : test -container 64 test -container 32
test-container64 :
@echo >& 2 ":: Testing 64-bit container"
$( CONTAINER_SHELL64) -c "echo Hello World!"
test-container32 :
@echo >& 2 ":: Testing 32-bit container"
$( CONTAINER_SHELL32) -c "echo Hello World!"
# Many of the configure steps below depend on the makefile itself, such that they are dirtied by changing the recipes
# that create them. This can be annoying when working on the makefile, building with NO_MAKEFILE_DEPENDENCY=1 disables
# this.
MAKEFILE_DEP := $( MAKEFILE_LIST)
i f e q ( $( NO_MAKEFILE_DEPENDENCY ) , 1 )
MAKEFILE_DEP :=
e n d i f
##
## Global config
##
TOOLS_DIR32 := ./obj-tools32
TOOLS_DIR64 := ./obj-tools64
DST_BASE := ./dist
DST_DIR := $( DST_BASE) /dist
2018-10-05 19:44:14 +03:00
DEPLOY_DIR := ./deploy
2019-10-18 18:41:20 +03:00
REDIST_DIR := ./redist
2018-08-21 03:11:58 +03:00
# All top level goals. Lazy evaluated so they can be added below.
GOAL_TARGETS = $( GOAL_TARGETS_LIBS)
# Excluding goals like wine and dist that are either long running or slow per invocation
GOAL_TARGETS_LIBS =
# Any explicit thing, superset
ALL_TARGETS =
##
## Platform-specific variables
##
2019-09-27 22:28:02 +03:00
i f n e q ( $( UNSTRIPPED_BUILD ) , )
STRIP :=
INSTALL_PROGRAM_FLAGS :=
MESON_STRIP_ARG :=
2019-11-04 19:20:59 +03:00
VKD3D_INSTALL_TARGET := install
2019-09-27 22:28:02 +03:00
e l s e
STRIP := strip
INSTALL_PROGRAM_FLAGS := -s
MESON_STRIP_ARG := --strip
2019-11-04 19:20:59 +03:00
VKD3D_INSTALL_TARGET := install-strip
2019-09-27 22:28:02 +03:00
e n d i f
2018-08-21 03:11:58 +03:00
2018-10-18 00:27:24 +03:00
OPTIMIZE_FLAGS := -O2 -march= nocona $( call cc-option,$( CC) ,-mtune= core-avx2,) -mfpmath= sse
2018-10-18 17:47:38 +03:00
SANITY_FLAGS := -fwrapv -fno-strict-aliasing
COMMON_FLAGS := $( OPTIMIZE_FLAGS) $( SANITY_FLAGS)
2018-10-17 19:10:53 +03:00
2018-08-21 03:11:58 +03:00
# Use $(call QUOTE,$(VAR)) to flatten a list to a single element (for feeding to a shell)
# v-- This flattens a list when called. Don't look directly into it.
QUOTE = $( subst $( eval ) ,\ ,$( 1) )
QUOTE_VARIABLE = $( eval $( 1) := $$ ( call QUOTE,$$ ( $( 1) ) ) )
QUOTE_VARIABLE_LIST = $( foreach a,$( 1) ,$( call QUOTE_VARIABLE,$( a) ) )
# These variables might need to be quoted, but might not
#
# That is, $(STRIP) is how you invoke strip, STRIP=$(STRIP_QUOTED) is how you pass it to a shell script properly
# quoted
STRIP_QUOTED = $( call QUOTE,$( STRIP) )
CC_QUOTED = $( call QUOTE,$( CC) )
CXX_QUOTED = $( call QUOTE,$( CXX) )
##
## Target configs
##
COMPAT_MANIFEST_TEMPLATE := $( SRCDIR) /compatibilitytool.vdf.template
LICENSE := $( SRCDIR) /dist.LICENSE
2019-12-31 18:33:26 +03:00
OFL_LICENSE := $( SRCDIR) /fonts/liberation-fonts/LICENSE
2018-08-21 03:11:58 +03:00
2020-01-20 19:43:40 +03:00
GECKO_VER := 2.47.1
2020-01-23 19:01:36 +03:00
GECKO32_TARBALL := wine-gecko-$( GECKO_VER) -x86.tar.bz2
GECKO64_TARBALL := wine-gecko-$( GECKO_VER) -x86_64.tar.bz2
2018-10-05 22:08:17 +03:00
2019-11-04 17:17:55 +03:00
WINEMONO_VER := 4.9.4
2019-04-05 23:42:16 +03:00
WINEMONO_TARBALL := wine-mono-bin-$( WINEMONO_VER) .tar.gz
2018-08-21 03:11:58 +03:00
FFMPEG := $( SRCDIR) /ffmpeg
FFMPEG_OBJ32 := ./obj-ffmpeg32
FFMPEG_OBJ64 := ./obj-ffmpeg64
FFMPEG_CROSS_CFLAGS :=
FFMPEG_CROSS_LDFLAGS :=
2018-11-16 22:12:52 +03:00
FAUDIO := $( SRCDIR) /FAudio
FAUDIO_OBJ32 := ./obj-faudio32
FAUDIO_OBJ64 := ./obj-faudio64
2018-08-21 03:11:58 +03:00
LSTEAMCLIENT := $( SRCDIR) /lsteamclient
2018-10-18 01:43:21 +03:00
LSTEAMCLIENT32 := ./syn-lsteamclient32/lsteamclient
LSTEAMCLIENT64 := ./syn-lsteamclient64/lsteamclient
2018-08-21 03:11:58 +03:00
LSTEAMCLIENT_OBJ32 := ./obj-lsteamclient32
LSTEAMCLIENT_OBJ64 := ./obj-lsteamclient64
2018-12-14 22:28:02 +03:00
STEAMEXE_SRC := $( SRCDIR) /steam_helper
STEAMEXE_OBJ := ./obj-steam
STEAMEXE_SYN := ./syn-steam/steam
2018-08-21 03:11:58 +03:00
WINE := $( SRCDIR) /wine
WINE_DST32 := ./dist-wine32
WINE_OBJ32 := ./obj-wine32
WINE_OBJ64 := ./obj-wine64
WINEMAKER := $( abspath $( WINE) /tools/winemaker/winemaker)
# Wine outputs that need to exist for other steps (dist)
WINE_OUT_BIN := $( DST_DIR) /bin/wine64
WINE_OUT_SERVER := $( DST_DIR) /bin/wineserver
WINE_OUT := $( WINE_OUT_BIN) $( WINE_OUT_SERVER)
# Tool-only build outputs needed for other projects
WINEGCC32 := $( TOOLS_DIR32) /bin/winegcc
WINEBUILD32 := $( TOOLS_DIR32) /bin/winebuild
WINE_BUILDTOOLS32 := $( WINEGCC32) $( WINEBUILD32)
WINEGCC64 := $( TOOLS_DIR64) /bin/winegcc
WINEBUILD64 := $( TOOLS_DIR64) /bin/winebuild
WINE_BUILDTOOLS64 := $( WINEGCC64) $( WINEBUILD64)
2019-08-22 22:44:30 +03:00
WINEWIDL_OBJ32 := ./obj-widl32
WINEWIDL_OBJ64 := ./obj-widl64
WINEWIDL32 := $( WINEWIDL_OBJ32) /tools/widl/widl
WINEWIDL64 := $( WINEWIDL_OBJ64) /tools/widl/widl
2018-08-21 03:11:58 +03:00
VRCLIENT := $( SRCDIR) /vrclient_x64
VRCLIENT32 := ./syn-vrclient32
VRCLIENT_OBJ64 := ./obj-vrclient64
VRCLIENT_OBJ32 := ./obj-vrclient32
DXVK := $( SRCDIR) /dxvk
DXVK_OBJ32 := ./obj-dxvk32
DXVK_OBJ64 := ./obj-dxvk64
2019-08-22 22:44:30 +03:00
VULKAN_HEADERS := $( SRCDIR) /Vulkan-Headers
VULKAN_H_OBJ32 := ./obj-vulkan-headers32
VULKAN_H_OBJ64 := ./obj-vulkan-headers64
VULKAN_H32 := $( TOOLS_DIR32) /include/vulkan/vulkan.h
VULKAN_H64 := $( TOOLS_DIR64) /include/vulkan/vulkan.h
SPIRV_HEADERS := $( SRCDIR) /SPIRV-Headers
SPIRV_H_OBJ32 := ./obj-spirv-headers32
SPIRV_H_OBJ64 := ./obj-spirv-headers64
SPIRV_H32 := $( TOOLS_DIR32) /include/spirv/spirv.h
SPIRV_H64 := $( TOOLS_DIR64) /include/spirv/spirv.h
VKD3D := $( SRCDIR) /vkd3d
VKD3D_OBJ32 := ./obj-vkd3d32
VKD3D_OBJ64 := ./obj-vkd3d64
2018-08-21 03:11:58 +03:00
CMAKE := $( SRCDIR) /cmake
CMAKE_OBJ32 := ./obj-cmake32
CMAKE_OBJ64 := ./obj-cmake64
CMAKE_BIN32 := $( CMAKE_OBJ32) /built/bin/cmake
CMAKE_BIN64 := $( CMAKE_OBJ64) /built/bin/cmake
2019-05-30 10:02:18 +03:00
BISON_VER = 3.3.2
BISON_TARBALL := bison-$( BISON_VER) .tar.xz
BISON := $( SRCDIR) /contrib/bison-$( BISON_VER)
BISON_OBJ32 := ./obj-bison32
BISON_OBJ64 := ./obj-bison64
BISON_BIN32 := $( BISON_OBJ32) /built/bin/bison
BISON_BIN64 := $( BISON_OBJ64) /built/bin/bison
2018-10-12 14:20:49 +03:00
FONTS := $( SRCDIR) /fonts
FONTS_OBJ := ./obj-fonts
2018-08-21 03:11:58 +03:00
## Object directories
OBJ_DIRS := $( TOOLS_DIR32) $( TOOLS_DIR64) \
$( FFMPEG_OBJ32) $( FFMPEG_OBJ64) \
2018-11-16 22:12:52 +03:00
$( FAUDIO_OBJ32) $( FAUDIO_OBJ64) \
2018-08-21 03:11:58 +03:00
$( LSTEAMCLIENT_OBJ32) $( LSTEAMCLIENT_OBJ64) \
2018-12-14 22:28:02 +03:00
$( STEAMEXE_OBJ) \
2018-08-21 03:11:58 +03:00
$( WINE_OBJ32) $( WINE_OBJ64) \
$( VRCLIENT_OBJ32) $( VRCLIENT_OBJ64) \
$( DXVK_OBJ32) $( DXVK_OBJ64) \
2019-05-30 10:02:18 +03:00
$( BISON_OBJ32) $( BISON_OBJ64) \
2019-08-22 22:44:30 +03:00
$( VULKAN_H_OBJ32) $( VULKAN_H_OBJ64) \
$( SPIRV_H_OBJ32) $( SPIRV_H_OBJ64) \
$( WINEWIDL_OBJ32) $( WINEWIDL_OBJ64) \
$( VKD3D_OBJ32) $( VKD3D_OBJ64) \
2018-08-21 03:11:58 +03:00
$( CMAKE_OBJ32) $( CMAKE_OBJ64)
$(OBJ_DIRS) :
mkdir -p $@
2019-06-19 20:23:26 +03:00
## downloads -- Convenience target to download packages used during the build
## process. Places them in subdirs one up from the Proton source dir, so
## they won't be wiped during git-clean, vagrant rsync, etc.
.PHONY : downloads
BISON_TARBALL_URL := https://ftpmirror.gnu.org/bison/$( BISON_TARBALL)
2020-01-23 19:01:36 +03:00
GECKO64_TARBALL_URL := https://dl.winehq.org/wine/wine-gecko/$( GECKO_VER) /$( GECKO64_TARBALL)
GECKO32_TARBALL_URL := https://dl.winehq.org/wine/wine-gecko/$( GECKO_VER) /$( GECKO32_TARBALL)
2019-06-19 20:23:26 +03:00
MONO_TARBALL_URL := https://github.com/madewokherd/wine-mono/releases/download/wine-mono-$( WINEMONO_VER) /$( WINEMONO_TARBALL)
SHARED_BISON_TARBALL := $( SRCDIR) /../bison/$( BISON_TARBALL)
2020-01-23 19:01:36 +03:00
SHARED_GECKO64_TARBALL := $( SRCDIR) /../gecko/$( GECKO64_TARBALL)
SHARED_GECKO32_TARBALL := $( SRCDIR) /../gecko/$( GECKO32_TARBALL)
2019-06-19 20:23:26 +03:00
SHARED_MONO_TARBALL := $( SRCDIR) /../mono/$( WINEMONO_TARBALL)
$(SHARED_BISON_TARBALL) :
mkdir -p $( dir $@ )
wget -O " $@ " " $( BISON_TARBALL_URL) "
2020-01-23 19:01:36 +03:00
$(SHARED_GECKO64_TARBALL) :
2019-06-19 20:23:26 +03:00
mkdir -p $( dir $@ )
2020-01-23 19:01:36 +03:00
wget -O " $@ " " $( GECKO64_TARBALL_URL) "
2019-06-19 20:23:26 +03:00
2020-01-23 19:01:36 +03:00
$(SHARED_GECKO32_TARBALL) :
2019-06-19 20:23:26 +03:00
mkdir -p $( dir $@ )
2020-01-23 19:01:36 +03:00
wget -O " $@ " " $( GECKO32_TARBALL_URL) "
2019-06-19 20:23:26 +03:00
$(SHARED_MONO_TARBALL) :
mkdir -p $( dir $@ )
wget -O " $@ " " $( MONO_TARBALL_URL) "
2020-01-23 19:01:36 +03:00
downloads : $( SHARED_BISON_TARBALL ) $( SHARED_GECKO 64_TARBALL ) $( SHARED_GECKO 32_TARBALL ) $( SHARED_MONO_TARBALL )
2019-06-19 20:23:26 +03:00
2018-08-21 03:11:58 +03:00
##
## dist/install -- steps to finalize the install
##
$(DST_DIR) :
mkdir -p $@
STEAM_DIR := $( HOME) /.steam/root
2018-12-21 00:48:22 +03:00
TOOLMANIFEST_TARGET := $( addprefix $( DST_BASE) /,toolmanifest.vdf)
$(TOOLMANIFEST_TARGET) : $( addprefix $ ( SRCDIR ) /,toolmanifest .vdf )
FILELOCK_TARGET := $( addprefix $( DST_BASE) /,filelock.py)
$(FILELOCK_TARGET) : $( addprefix $ ( SRCDIR ) /,filelock .py )
PROTON_PY_TARGET := $( addprefix $( DST_BASE) /,proton)
$(PROTON_PY_TARGET) : $( addprefix $ ( SRCDIR ) /,proton )
PROTON37_TRACKED_FILES_TARGET := $( addprefix $( DST_BASE) /,proton_3.7_tracked_files)
$(PROTON37_TRACKED_FILES_TARGET) : $( addprefix $ ( SRCDIR ) /,proton_ 3.7_tracked_files )
USER_SETTINGS_PY_TARGET := $( addprefix $( DST_BASE) /,user_settings.sample.py)
$(USER_SETTINGS_PY_TARGET) : $( addprefix $ ( SRCDIR ) /,user_settings .sample .py )
DIST_COPY_TARGETS := $( TOOLMANIFEST_TARGET) $( FILELOCK_TARGET) $( PROTON_PY_TARGET) \
$( PROTON37_TRACKED_FILES_TARGET) $( USER_SETTINGS_PY_TARGET)
2018-08-21 03:11:58 +03:00
DIST_VERSION := $( DST_DIR) /version
2018-10-15 19:04:58 +03:00
DIST_OVR32 := $( DST_DIR) /lib/wine/dxvk/openvr_api_dxvk.dll
DIST_OVR64 := $( DST_DIR) /lib64/wine/dxvk/openvr_api_dxvk.dll
2018-08-21 03:11:58 +03:00
DIST_PREFIX := $( DST_DIR) /share/default_pfx/
DIST_COMPAT_MANIFEST := $( DST_BASE) /compatibilitytool.vdf
DIST_LICENSE := $( DST_BASE) /LICENSE
2019-12-31 18:33:26 +03:00
DIST_OFL_LICENSE := $( DST_BASE) /LICENSE.OFL
2018-10-05 22:08:17 +03:00
DIST_GECKO_DIR := $( DST_DIR) /share/wine/gecko
2020-01-23 19:01:36 +03:00
DIST_GECKO32 := $( DIST_GECKO_DIR) /wine-gecko-$( GECKO_VER) -x86
DIST_GECKO64 := $( DIST_GECKO_DIR) /wine-gecko-$( GECKO_VER) -x86_64
2019-04-05 23:42:16 +03:00
DIST_WINEMONO_DIR := $( DST_DIR) /share/wine/mono
DIST_WINEMONO := $( DIST_WINEMONO_DIR) /wine-mono-$( WINEMONO_VER)
2018-10-12 14:20:49 +03:00
DIST_FONTS := $( DST_DIR) /share/fonts
2018-08-21 03:11:58 +03:00
2018-12-21 00:59:47 +03:00
DIST_TARGETS := $( DIST_COPY_TARGETS) $( DIST_OVR32) $( DIST_OVR64) \
2019-04-05 23:42:16 +03:00
$( DIST_GECKO32) $( DIST_GECKO64) $( DIST_WINEMONO) \
2019-12-31 18:33:26 +03:00
$( DIST_COMPAT_MANIFEST) $( DIST_LICENSE) $( DIST_OFL_LICENSE) $( DIST_FONTS)
2018-08-21 03:11:58 +03:00
2019-12-31 18:33:26 +03:00
DEPLOY_COPY_TARGETS := $( DIST_COPY_TARGETS) $( DIST_VERSION) $( DIST_LICENSE) $( DIST_OFL_LICENSE)
2019-10-18 18:41:20 +03:00
REDIST_COPY_TARGETS := $( DEPLOY_COPY_TARGETS) $( DIST_COMPAT_MANIFEST)
2018-08-21 03:11:58 +03:00
$(DIST_LICENSE) : $( LICENSE )
cp -a $< $@
2019-12-31 18:33:26 +03:00
$(DIST_OFL_LICENSE) : $( OFL_LICENSE )
cp -a $< $@
2018-10-15 19:04:58 +03:00
$(DIST_OVR32) : $( SRCDIR ) /openvr /bin /win 32/openvr_api .dll | $( DST_DIR )
mkdir -p $( DST_DIR) /lib/wine/dxvk
2018-08-21 03:11:58 +03:00
cp -a $< $@
2018-10-15 19:04:58 +03:00
$(DIST_OVR64) : $( SRCDIR ) /openvr /bin /win 64/openvr_api .dll | $( DST_DIR )
mkdir -p $( DST_DIR) /lib64/wine/dxvk
2018-08-21 03:11:58 +03:00
cp -a $< $@
$(DIST_COPY_TARGETS) : | $( DST_DIR )
cp -a $( SRCDIR) /$( notdir $@ ) $@
$(DIST_COMPAT_MANIFEST) : $( COMPAT_MANIFEST_TEMPLATE ) $( MAKEFILE_DEP ) | $( DST_DIR )
2018-10-13 10:27:52 +03:00
sed -r 's|##BUILD_NAME##|$(BUILD_NAME)|' $< > $@
2018-08-21 03:11:58 +03:00
2018-10-05 22:08:17 +03:00
$(DIST_GECKO_DIR) :
mkdir -p $@
$(DIST_GECKO64) : | $( DIST_GECKO_DIR )
2020-01-23 19:01:36 +03:00
if [ -e " $( SHARED_GECKO64_TARBALL) " ] ; then \
tar -xf " $( SHARED_GECKO64_TARBALL) " -C " $( dir $@ ) " ; \
2018-10-05 22:08:17 +03:00
else \
mkdir -p $( SRCDIR) /contrib/; \
2020-01-23 19:01:36 +03:00
if [ ! -e " $( SRCDIR) /contrib/ $( GECKO64_TARBALL) " ] ; then \
echo " >>>> Downloading wine-gecko. To avoid this in future, put it here: $( SRCDIR) /../gecko/ $( GECKO64_TARBALL) " ; \
wget -O " $( SRCDIR) /contrib/ $( GECKO64_TARBALL) " " $( GECKO64_TARBALL_URL) " ; \
2018-10-05 22:08:17 +03:00
fi ; \
2020-01-23 19:01:36 +03:00
tar -xf " $( SRCDIR) /contrib/ $( GECKO64_TARBALL) " -C " $( dir $@ ) " ; \
2018-10-05 22:08:17 +03:00
fi
$(DIST_GECKO32) : | $( DIST_GECKO_DIR )
2020-01-23 19:01:36 +03:00
if [ -e " $( SHARED_GECKO32_TARBALL) " ] ; then \
tar -xf " $( SHARED_GECKO32_TARBALL) " -C " $( dir $@ ) " ; \
2018-10-05 22:08:17 +03:00
else \
mkdir -p $( SRCDIR) /contrib/; \
2020-01-23 19:01:36 +03:00
if [ ! -e " $( SRCDIR) /contrib/ $( GECKO32_TARBALL) " ] ; then \
echo " >>>> Downloading wine-gecko. To avoid this in future, put it here: $( SRCDIR) /../gecko/ $( GECKO32_TARBALL) " ; \
wget -O " $( SRCDIR) /contrib/ $( GECKO32_TARBALL) " " $( GECKO32_TARBALL_URL) " ; \
2018-10-05 22:08:17 +03:00
fi ; \
2020-01-23 19:01:36 +03:00
tar -xf " $( SRCDIR) /contrib/ $( GECKO32_TARBALL) " -C " $( dir $@ ) " ; \
2018-10-05 22:08:17 +03:00
fi
2019-04-05 23:42:16 +03:00
$(DIST_WINEMONO_DIR) :
mkdir -p $@
$(DIST_WINEMONO) : | $( DIST_WINEMONO_DIR )
2020-01-23 19:01:36 +03:00
if [ -e " $( SHARED_MONO_TARBALL) " ] ; then \
tar -xf " $( SHARED_MONO_TARBALL) " -C " $( dir $@ ) " ; \
2019-04-05 23:42:16 +03:00
else \
mkdir -p $( SRCDIR) /contrib/; \
if [ ! -e " $( SRCDIR) /contrib/ $( WINEMONO_TARBALL) " ] ; then \
echo " >>>> Downloading wine-mono. To avoid this in future, put it here: $( SRCDIR) /../mono/ $( WINEMONO_TARBALL) " ; \
2019-06-19 20:23:26 +03:00
wget -O " $( SRCDIR) /contrib/ $( WINEMONO_TARBALL) " " $( MONO_TARBALL_URL) " ; \
2019-04-05 23:42:16 +03:00
fi ; \
tar -xf " $( SRCDIR) /contrib/ $( WINEMONO_TARBALL) " -C " $( dir $@ ) " ; \
fi
2018-10-12 14:20:49 +03:00
$(DIST_FONTS) : fonts
mkdir -p $@
cp $( FONTS_OBJ) /*.ttf " $@ "
2019-08-16 21:06:09 +03:00
cp $( FONTS_OBJ) /*.otf " $@ "
2018-10-12 14:20:49 +03:00
2018-08-21 03:11:58 +03:00
.PHONY : dist
ALL_TARGETS += dist
GOAL_TARGETS += dist
2019-12-18 16:50:38 +03:00
dist : $( DIST_TARGETS ) wine vrclient lsteamclient steam dxvk | $( DST_DIR )
2018-12-21 00:59:47 +03:00
echo ` date '+%s' ` ` GIT_DIR = $( abspath $( SRCDIR) /.git) git describe --tags` > $( DIST_VERSION)
cp $( DIST_VERSION) $( DST_BASE) /
2018-08-21 03:11:58 +03:00
rm -rf $( abspath $( DIST_PREFIX) ) && \
2019-02-05 18:41:03 +03:00
WINEPREFIX = $( abspath $( DIST_PREFIX) ) $( STEAM_RUNTIME_RUNSH) $( WINE_OUT_BIN) wineboot && \
WINEPREFIX = $( abspath $( DIST_PREFIX) ) $( STEAM_RUNTIME_RUNSH) $( WINE_OUT_SERVER) -w && \
2018-10-12 14:20:49 +03:00
ln -s $( FONTLINKPATH) /LiberationSans-Regular.ttf $( abspath $( DIST_PREFIX) ) /drive_c/windows/Fonts/arial.ttf && \
ln -s $( FONTLINKPATH) /LiberationSans-Bold.ttf $( abspath $( DIST_PREFIX) ) /drive_c/windows/Fonts/arialbd.ttf && \
ln -s $( FONTLINKPATH) /LiberationSerif-Regular.ttf $( abspath $( DIST_PREFIX) ) /drive_c/windows/Fonts/times.ttf && \
2019-08-16 21:06:09 +03:00
ln -s $( FONTLINKPATH) /LiberationMono-Regular.ttf $( abspath $( DIST_PREFIX) ) /drive_c/windows/Fonts/cour.ttf && \
ln -s $( FONTLINKPATH) /SourceHanSansSCRegular.otf $( abspath $( DIST_PREFIX) ) /drive_c/windows/Fonts/msyh.ttf
2018-10-23 16:44:58 +03:00
#The use of "arial" here is for compatibility with programs that require that exact string. These links do not point to Arial.
#The use of "times" here is for compatibility with programs that require that exact string. This link does not point to Times New Roman.
#The use of "cour" here is for compatibility with programs that require that exact string. This link does not point to Courier New.
2019-08-16 21:06:09 +03:00
#The use of "msyh" here is for compatibility with programs that require that exact string. This link does not point to Microsoft YaHei.
2018-08-21 03:11:58 +03:00
2019-10-18 18:41:20 +03:00
deploy : dist | $( filter -out dist deploy install redist ,$ ( MAKECMDGOALS ) )
2018-10-05 19:44:14 +03:00
mkdir -p $( DEPLOY_DIR) && \
cp -a $( DEPLOY_COPY_TARGETS) $( DEPLOY_DIR) && \
2019-10-18 17:56:47 +03:00
tar -C $( DST_DIR) -c . > $( DEPLOY_DIR) /proton_dist.tar
@echo "Created deployment archive at " $( DEPLOY_DIR) "/proton_dist.tar"
2018-10-05 19:44:14 +03:00
2019-10-18 18:41:20 +03:00
install : dist | $( filter -out dist deploy install redist ,$ ( MAKECMDGOALS ) )
2018-08-21 03:11:58 +03:00
if [ ! -d $( STEAM_DIR) ] ; then echo >& 2 "!! " $( STEAM_DIR) " does not exist, cannot install" ; return 1; fi
mkdir -p $( STEAM_DIR) /compatibilitytools.d/$( BUILD_NAME)
2019-05-14 21:19:38 +03:00
cp -r $( DST_BASE) /* $( STEAM_DIR) /compatibilitytools.d/$( BUILD_NAME)
2018-08-21 03:11:58 +03:00
@echo "Installed Proton to " $( STEAM_DIR) /compatibilitytools.d/$( BUILD_NAME)
@echo "You may need to restart Steam to select this tool"
2019-10-18 18:41:20 +03:00
redist : dist | $( filter -out dist deploy install redist ,$ ( MAKECMDGOALS ) )
mkdir -p $( REDIST_DIR)
cp -a $( REDIST_COPY_TARGETS) $( REDIST_DIR)
tar -C $( DST_DIR) -c . | gzip -c -1 > $( REDIST_DIR) /proton_dist.tar.gz
@echo "Created redistribution tarball at " $( REDIST_DIR) "/proton_dist.tar.gz"
2019-02-05 19:04:53 +03:00
.PHONY : module 32 module 64 module
module32 : SHELL = $( CONTAINER_SHELL 32)
module32 :
cd $( WINE_OBJ32) /dlls/$( module) && make
module64 : SHELL = $( CONTAINER_SHELL 64)
module64 :
cd $( WINE_OBJ64) /dlls/$( module) && make
module : module 32 module 64
2018-08-21 03:11:58 +03:00
##
## ffmpeg
##
i f e q ( $( WITH_FFMPEG ) , 1 )
FFMPEG_CONFIGURE_FILES32 := $( FFMPEG_OBJ32) /Makefile
FFMPEG_CONFIGURE_FILES64 := $( FFMPEG_OBJ64) /Makefile
# 64bit-configure
$(FFMPEG_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(FFMPEG_CONFIGURE_FILES64) : $( FFMPEG ) /configure $( MAKEFILE_DEP ) | $( FFMPEG_OBJ 64)
cd $( dir $@ ) && \
$( abspath $( FFMPEG) ) /configure \
--cc= $( CC_QUOTED) --cxx= $( CXX_QUOTED) \
--prefix= $( abspath $( TOOLS_DIR64) ) \
--disable-static \
--enable-shared \
--disable-programs \
--disable-doc \
--disable-avdevice \
--disable-avformat \
--disable-swresample \
--disable-swscale \
--disable-postproc \
--disable-avfilter \
--disable-alsa \
--disable-iconv \
--disable-libxcb_shape \
--disable-libxcb_shm \
--disable-libxcb_xfixes \
--disable-sdl2 \
--disable-xlib \
--disable-zlib \
--disable-bzlib \
--disable-libxcb \
--disable-vaapi \
--disable-vdpau \
--disable-everything \
--enable-decoder= wmav2 \
--enable-decoder= adpcm_ms && \
[ ! -f ./Makefile ] || touch ./Makefile
# ^ ffmpeg's configure script doesn't update the timestamp on this guy in the case of a no-op
# 32-bit configure
$(FFMPEG_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(FFMPEG_CONFIGURE_FILES32) : $( FFMPEG ) /configure $( MAKEFILE_DEP ) | $( FFMPEG_OBJ 32)
cd $( dir $@ ) && \
$( abspath $( FFMPEG) ) /configure \
--cc= $( CC_QUOTED) --cxx= $( CXX_QUOTED) \
--prefix= $( abspath $( TOOLS_DIR32) ) \
--extra-cflags= $( FFMPEG_CROSS_CFLAGS) --extra-ldflags= $( FFMPEG_CROSS_LDFLAGS) \
--disable-static \
--enable-shared \
--disable-programs \
--disable-doc \
--disable-avdevice \
--disable-avformat \
--disable-swresample \
--disable-swscale \
--disable-postproc \
--disable-avfilter \
--disable-alsa \
--disable-iconv \
--disable-libxcb_shape \
--disable-libxcb_shm \
--disable-libxcb_xfixes \
--disable-sdl2 \
--disable-xlib \
--disable-zlib \
--disable-bzlib \
--disable-libxcb \
--disable-vaapi \
--disable-vdpau \
--disable-everything \
--enable-decoder= wmav2 \
--enable-decoder= adpcm_ms && \
[ ! -f ./Makefile ] || touch ./Makefile
# ^ ffmpeg's configure script doesn't update the timestamp on this guy in the case of a no-op
## ffmpeg goals
FFMPEG_TARGETS = ffmpeg ffmpeg_configure ffmpeg32 ffmpeg64 ffmpeg_configure32 ffmpeg_configure64
ALL_TARGETS += $( FFMPEG_TARGETS)
GOAL_TARGETS_LIBS += ffmpeg
.PHONY : $( FFMPEG_TARGETS )
ffmpeg_configure : $( FFMPEG_CONFIGURE_FILES 32) $( FFMPEG_CONFIGURE_FILES 64)
ffmpeg_configure64 : $( FFMPEG_CONFIGURE_FILES 64)
ffmpeg_configure32 : $( FFMPEG_CONFIGURE_FILES 32)
ffmpeg : ffmpeg 32 ffmpeg 64
ffmpeg64 : SHELL = $( CONTAINER_SHELL 64)
ffmpeg64 : $( FFMPEG_CONFIGURE_FILES 64)
2018-10-17 17:54:49 +03:00
+$( MAKE) -C $( FFMPEG_OBJ64)
+$( MAKE) -C $( FFMPEG_OBJ64) install
2018-10-18 01:44:21 +03:00
mkdir -pv $( DST_DIR) /lib64
2019-03-27 21:37:14 +03:00
cp -a $( TOOLS_DIR64) /lib/{ libavcodec,libavutil} * $( DST_DIR) /lib64
2018-08-21 03:11:58 +03:00
ffmpeg32 : SHELL = $( CONTAINER_SHELL 32)
ffmpeg32 : $( FFMPEG_CONFIGURE_FILES 32)
2018-10-17 17:54:49 +03:00
+$( MAKE) -C $( FFMPEG_OBJ32)
+$( MAKE) -C $( FFMPEG_OBJ32) install
2018-10-18 01:44:21 +03:00
mkdir -pv $( DST_DIR) /lib
2019-03-27 21:37:14 +03:00
cp -a $( TOOLS_DIR32) /lib/{ libavcodec,libavutil} * $( DST_DIR) /lib
2018-08-21 03:11:58 +03:00
e n d i f # ifeq ($(WITH_FFMPEG),1)
2018-11-16 22:12:52 +03:00
##
## FAudio
##
2018-12-05 20:36:44 +03:00
FAUDIO_CMAKE_FLAGS = -DCMAKE_BUILD_TYPE= Release -DFORCE_ENABLE_DEBUGCONFIGURATION= ON -DLOG_ASSERTIONS= ON -DCMAKE_INSTALL_LIBDIR= "lib" -DXNASONG= OFF
2018-11-28 19:59:06 +03:00
i f e q ( $( WITH_FFMPEG ) , 1 )
FAUDIO_CMAKE_FLAGS += -DFFMPEG= ON
2018-11-16 22:12:52 +03:00
e n d i f # ifeq ($(WITH_FFMPEG),1)
FAUDIO_TARGETS = faudio faudio32 faudio64
ALL_TARGETS += $( FAUDIO_TARGETS)
GOAL_TARGETS_LIBS += faudio
.PHONY : faudio faudio 32 faudio 64
faudio : faudio 32 faudio 64
2018-11-28 19:59:06 +03:00
FAUDIO_CONFIGURE_FILES32 := $( FAUDIO_OBJ32) /Makefile
FAUDIO_CONFIGURE_FILES64 := $( FAUDIO_OBJ64) /Makefile
$(FAUDIO_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(FAUDIO_CONFIGURE_FILES32) : $( FAUDIO ) /CMakeLists .txt $( MAKEFILE_DEP ) $( CMAKE_BIN 32) | $( FAUDIO_OBJ 32)
cd $( dir $@ ) && \
../$( CMAKE_BIN32) $( abspath $( FAUDIO) ) \
-DCMAKE_INSTALL_PREFIX= " $( abspath $( TOOLS_DIR32) ) " \
$( FAUDIO_CMAKE_FLAGS) \
-DCMAKE_C_FLAGS= "-m32" -DCMAKE_CXX_FLAGS= "-m32"
$(FAUDIO_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(FAUDIO_CONFIGURE_FILES64) : $( FAUDIO ) /CMakeLists .txt $( MAKEFILE_DEP ) $( CMAKE_BIN 64) | $( FAUDIO_OBJ 64)
cd $( dir $@ ) && \
../$( CMAKE_BIN64) $( abspath $( FAUDIO) ) \
-DCMAKE_INSTALL_PREFIX= " $( abspath $( TOOLS_DIR64) ) " \
$( FAUDIO_CMAKE_FLAGS)
2018-11-16 22:12:52 +03:00
faudio32 : SHELL = $( CONTAINER_SHELL 32)
2018-11-28 19:59:06 +03:00
faudio32 : $( FAUDIO_CONFIGURE_FILES 32)
+$( MAKE) -C $( FAUDIO_OBJ32) VERBOSE = 1
+$( MAKE) -C $( FAUDIO_OBJ32) install VERBOSE = 1
2018-11-16 22:12:52 +03:00
mkdir -p $( DST_DIR) /lib
2019-03-27 21:37:14 +03:00
cp -a $( TOOLS_DIR32) /lib/libFAudio* $( DST_DIR) /lib/
2018-11-16 22:12:52 +03:00
[ x" $( STRIP) " = x ] || $( STRIP) $( DST_DIR) /lib/libFAudio.so
2018-11-28 19:59:06 +03:00
faudio64 : SHELL = $( CONTAINER_SHELL 64)
faudio64 : $( FAUDIO_CONFIGURE_FILES 64)
+$( MAKE) -C $( FAUDIO_OBJ64) VERBOSE = 1
+$( MAKE) -C $( FAUDIO_OBJ64) install VERBOSE = 1
mkdir -p $( DST_DIR) /lib64
2019-03-27 21:37:14 +03:00
cp -a $( TOOLS_DIR64) /lib/libFAudio* $( DST_DIR) /lib64/
2018-11-28 19:59:06 +03:00
[ x" $( STRIP) " = x ] || $( STRIP) $( DST_DIR) /lib64/libFAudio.so
2018-08-21 03:11:58 +03:00
##
## lsteamclient
##
2018-10-18 01:43:21 +03:00
# The source directory for lsteamclient is a synthetic symlink clone of the source directory, because we need to run
# winemaker in tree and it can stomp itself in parallel builds.
$(LSTEAMCLIENT64)/.created : $( LSTEAMCLIENT ) $( MAKEFILE_DEP )
rm -rf ./$( LSTEAMCLIENT64)
mkdir -p $( LSTEAMCLIENT64) /
cd $( LSTEAMCLIENT64) / && ln -sfv ../../$( LSTEAMCLIENT) /* .
touch $@
$(LSTEAMCLIENT32)/.created : $( LSTEAMCLIENT ) $( MAKEFILE_DEP )
rm -rf ./$( LSTEAMCLIENT32)
mkdir -p $( LSTEAMCLIENT32) /
cd $( LSTEAMCLIENT32) / && ln -sfv ../../$( LSTEAMCLIENT) /* .
touch $@
$(LSTEAMCLIENT64) : $( LSTEAMCLIENT 64) /.created
$(LSTEAMCLIENT32) : $( LSTEAMCLIENT 32) /.created
2018-08-21 03:11:58 +03:00
## Create & configure object directory for lsteamclient
LSTEAMCLIENT_CONFIGURE_FILES32 := $( LSTEAMCLIENT_OBJ32) /Makefile
LSTEAMCLIENT_CONFIGURE_FILES64 := $( LSTEAMCLIENT_OBJ64) /Makefile
# 64bit-configure
$(LSTEAMCLIENT_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
2018-10-18 01:43:21 +03:00
$(LSTEAMCLIENT_CONFIGURE_FILES64) : $( LSTEAMCLIENT 64) $( MAKEFILE_DEP ) | $( LSTEAMCLIENT_OBJ 64) $( WINEMAKER )
2018-08-21 03:11:58 +03:00
cd $( dir $@ ) && \
$( WINEMAKER) --nosource-fix --nolower-include --nodlls --nomsvcrt \
-DSTEAM_API_EXPORTS \
2018-10-29 21:26:08 +03:00
-Dprivate= public -Dprotected= public \
2018-08-21 03:11:58 +03:00
-I" ../ $( TOOLS_DIR64) " /include/ \
-I" ../ $( TOOLS_DIR64) " /include/wine/ \
-I" ../ $( TOOLS_DIR64) " /include/wine/windows/ \
-L" ../ $( TOOLS_DIR64) " /lib64/ \
-L" ../ $( TOOLS_DIR64) " /lib64/wine/ \
2018-10-18 01:43:21 +03:00
--dll ../$( LSTEAMCLIENT64) && \
cp ../$( LSTEAMCLIENT64) /Makefile . && \
echo >> ./Makefile 'SRCDIR := ../$(LSTEAMCLIENT64)' && \
2018-08-21 03:11:58 +03:00
echo >> ./Makefile 'vpath % $$(SRCDIR)' && \
echo >> ./Makefile 'lsteamclient_dll_LDFLAGS := $$(patsubst %.spec,$$(SRCDIR)/%.spec,$$(lsteamclient_dll_LDFLAGS))'
# 32-bit configure
$(LSTEAMCLIENT_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
2018-10-18 01:43:21 +03:00
$(LSTEAMCLIENT_CONFIGURE_FILES32) : $( LSTEAMCLIENT 32) $( MAKEFILE_DEP ) | $( LSTEAMCLIENT_OBJ 32) $( WINEMAKER )
2018-08-21 03:11:58 +03:00
cd $( dir $@ ) && \
$( WINEMAKER) --nosource-fix --nolower-include --nodlls --nomsvcrt --wine32 \
-DSTEAM_API_EXPORTS \
2018-10-29 21:26:08 +03:00
-Dprivate= public -Dprotected= public \
2018-08-21 03:11:58 +03:00
-I" ../ $( TOOLS_DIR32) " /include/ \
-I" ../ $( TOOLS_DIR32) " /include/wine/ \
-I" ../ $( TOOLS_DIR32) " /include/wine/windows/ \
-L" ../ $( TOOLS_DIR32) " /lib/ \
-L" ../ $( TOOLS_DIR32) " /lib/wine/ \
2018-10-18 01:43:21 +03:00
--dll ../$( LSTEAMCLIENT32) && \
cp ../$( LSTEAMCLIENT32) /Makefile . && \
echo >> ./Makefile 'SRCDIR := ../$(LSTEAMCLIENT32)' && \
2018-08-21 03:11:58 +03:00
echo >> ./Makefile 'vpath % $$(SRCDIR)' && \
echo >> ./Makefile 'lsteamclient_dll_LDFLAGS := -m32 $$(patsubst %.spec,$$(SRCDIR)/%.spec,$$(lsteamclient_dll_LDFLAGS))'
## lsteamclient goals
LSTEAMCLIENT_TARGETS = lsteamclient lsteamclient_configure lsteamclient32 lsteamclient64 lsteamclient_configure32 lsteamclient_configure64
ALL_TARGETS += $( LSTEAMCLIENT_TARGETS)
GOAL_TARGETS_LIBS += lsteamclient
.PHONY : $( LSTEAMCLIENT_TARGETS )
lsteamclient_configure : $( LSTEAMCLIENT_CONFIGURE_FILES 32) $( LSTEAMCLIENT_CONFIGURE_FILES 64)
lsteamclient_configure64 : $( LSTEAMCLIENT_CONFIGURE_FILES 64)
lsteamclient_configure32 : $( LSTEAMCLIENT_CONFIGURE_FILES 32)
lsteamclient : lsteamclient 32 lsteamclient 64
lsteamclient64 : SHELL = $( CONTAINER_SHELL 64)
lsteamclient64 : $( LSTEAMCLIENT_CONFIGURE_FILES 64) | $( WINE_BUILDTOOLS 64) $( filter $ ( MAKECMDGOALS ) ,wine 64 wine 32 wine )
2019-12-11 22:59:25 +03:00
+env PATH = " $( abspath $( TOOLS_DIR64) ) /bin: $( PATH) " CXXFLAGS = " -Wno-attributes $( COMMON_FLAGS) -std=gnu++11 -g " CFLAGS = " $( COMMON_FLAGS) -g " \
2018-10-17 17:54:49 +03:00
$( MAKE) -C $( LSTEAMCLIENT_OBJ64)
[ x" $( STRIP) " = x ] || $( STRIP) $( LSTEAMCLIENT_OBJ64) /lsteamclient.dll.so
2018-10-18 01:44:21 +03:00
mkdir -pv $( DST_DIR) /lib64/wine/
2018-10-17 17:54:49 +03:00
cp -a $( LSTEAMCLIENT_OBJ64) /lsteamclient.dll.so $( DST_DIR) /lib64/wine/
2018-08-21 03:11:58 +03:00
lsteamclient32 : SHELL = $( CONTAINER_SHELL 32)
lsteamclient32 : $( LSTEAMCLIENT_CONFIGURE_FILES 32) | $( WINE_BUILDTOOLS 32) $( filter $ ( MAKECMDGOALS ) ,wine 64 wine 32 wine )
2019-12-11 22:59:25 +03:00
+env PATH = " $( abspath $( TOOLS_DIR32) ) /bin: $( PATH) " LDFLAGS = "-m32" CXXFLAGS = " -m32 -Wno-attributes $( COMMON_FLAGS) -std=gnu++11 -g " CFLAGS = " -m32 $( COMMON_FLAGS) -g " \
2018-10-17 17:54:49 +03:00
$( MAKE) -C $( LSTEAMCLIENT_OBJ32)
[ x" $( STRIP) " = x ] || $( STRIP) $( LSTEAMCLIENT_OBJ32) /lsteamclient.dll.so
2018-10-18 01:44:21 +03:00
mkdir -pv $( DST_DIR) /lib/wine/
2018-10-17 17:54:49 +03:00
cp -a $( LSTEAMCLIENT_OBJ32) /lsteamclient.dll.so $( DST_DIR) /lib/wine/
2018-08-21 03:11:58 +03:00
2018-12-14 22:28:02 +03:00
## steam.exe
$(STEAMEXE_SYN)/.created : $( STEAMEXE_SRC ) $( MAKEFILE_DEP )
rm -rf $( STEAMEXE_SYN)
mkdir -p $( STEAMEXE_SYN) /
cd $( STEAMEXE_SYN) / && ln -sfv ../../$( STEAMEXE_SRC) /* .
touch $@
$(STEAMEXE_SYN) : $( STEAMEXE_SYN ) /.created
STEAMEXE_CONFIGURE_FILES := $( STEAMEXE_OBJ) /Makefile
# 32-bit configure
$(STEAMEXE_CONFIGURE_FILES) : SHELL = $( CONTAINER_SHELL 32)
$(STEAMEXE_CONFIGURE_FILES) : $( STEAMEXE_SYN ) $( MAKEFILE_DEP ) | $( STEAMEXE_OBJ ) $( WINEMAKER )
cd $( dir $@ ) && \
2019-06-19 21:36:50 +03:00
$( WINEMAKER) --nosource-fix --nolower-include --nodlls --wine32 \
2018-12-14 22:28:02 +03:00
-I" ../ $( TOOLS_DIR32) " /include/ \
-I" ../ $( TOOLS_DIR32) " /include/wine/ \
-I" ../ $( TOOLS_DIR32) " /include/wine/windows/ \
2019-06-19 21:36:50 +03:00
-I" ../ $( TOOLS_DIR32) " /include/wine/msvcrt/ \
2018-12-14 22:28:02 +03:00
-I" ../ $( SRCDIR) " /lsteamclient/steamworks_sdk_142/ \
-L" ../ $( TOOLS_DIR32) " /lib/ \
-L" ../ $( TOOLS_DIR32) " /lib/wine/ \
-L" ../ $( SRCDIR) " /steam_helper/ \
--guiexe ../$( STEAMEXE_SYN) && \
cp ../$( STEAMEXE_SYN) /Makefile . && \
echo >> ./Makefile 'SRCDIR := ../$(STEAMEXE_SYN)' && \
echo >> ./Makefile 'vpath % $$(SRCDIR)' && \
2019-08-07 22:31:51 +03:00
echo >> ./Makefile 'steam_exe_LDFLAGS := -m32 -lsteam_api -lole32 $$(steam_exe_LDFLAGS)'
2018-12-14 22:28:02 +03:00
## steam goals
STEAMEXE_TARGETS = steam steam_configure
ALL_TARGETS += $( STEAMEXE_TARGETS)
GOAL_TARGETS_LIBS += steam
.PHONY : $( STEAMEXE_TARGETS )
steam_configure : $( STEAMEXE_CONFIGURE_FILES )
steam : SHELL = $( CONTAINER_SHELL 32)
steam : $( STEAMEXE_CONFIGURE_FILES ) | $( WINE_BUILDTOOLS 32) $( filter $ ( MAKECMDGOALS ) ,wine 64 wine 32 wine )
+env PATH = " $( abspath $( TOOLS_DIR32) ) /bin: $( PATH) " LDFLAGS = "-m32" CXXFLAGS = " -m32 -Wno-attributes $( COMMON_FLAGS) -g " CFLAGS = " -m32 $( COMMON_FLAGS) -g " \
$( MAKE) -C $( STEAMEXE_OBJ)
[ x" $( STRIP) " = x ] || $( STRIP) $( STEAMEXE_OBJ) /steam.exe.so
mkdir -pv $( DST_DIR) /lib/wine/
cp -a $( STEAMEXE_OBJ) /steam.exe.so $( DST_DIR) /lib/wine/
cp $( STEAMEXE_SRC) /libsteam_api.so $( DST_DIR) /lib/
2018-08-21 03:11:58 +03:00
##
## wine
##
## Create & configure object directory for wine
WINE_CONFIGURE_FILES32 := $( WINE_OBJ32) /Makefile
WINE_CONFIGURE_FILES64 := $( WINE_OBJ64) /Makefile
2018-10-17 17:54:49 +03:00
WINE_COMMON_MAKE_ARGS := \
STRIP = " $( STRIP_QUOTED) " \
INSTALL_PROGRAM_FLAGS = " $( INSTALL_PROGRAM_FLAGS) "
WINE64_MAKE_ARGS := \
$( WINE_COMMON_MAKE_ARGS) \
prefix = " $( abspath $( TOOLS_DIR64) ) " \
libdir = " $( abspath $( TOOLS_DIR64) ) /lib64 " \
dlldir = " $( abspath $( TOOLS_DIR64) ) /lib64/wine "
WINE32_MAKE_ARGS := \
$( WINE_COMMON_MAKE_ARGS) \
prefix = " $( abspath $( TOOLS_DIR32) ) " \
libdir = " $( abspath $( TOOLS_DIR32) ) /lib " \
dlldir = " $( abspath $( TOOLS_DIR32) ) /lib/wine "
2018-08-21 03:11:58 +03:00
# 64bit-configure
$(WINE_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
2019-08-22 22:44:30 +03:00
$(WINE_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) | faudio 64 vkd 3d 64 $( WINE_OBJ 64) bison 64
2018-08-21 03:11:58 +03:00
cd $( dir $@ ) && \
../$( WINE) /configure \
--without-curses \
2019-11-20 10:53:46 +03:00
--enable-win64 \
--disable-tests \
--prefix= $( abspath $( DST_DIR) ) \
STRIP = $( STRIP_QUOTED) \
2019-11-26 23:12:09 +03:00
BISON = $( abspath $( BISON_BIN64) ) \
2019-11-20 10:53:46 +03:00
CFLAGS = " -I $( abspath $( TOOLS_DIR64) ) /include -g $( COMMON_FLAGS) " \
2019-12-10 18:19:37 +03:00
CXXFLAGS = " -I $( abspath $( TOOLS_DIR64) ) /include -g $( COMMON_FLAGS) -std=c++17 " \
2019-11-20 10:53:46 +03:00
LDFLAGS = -L$( abspath $( TOOLS_DIR64) ) /lib \
PKG_CONFIG_PATH = $( abspath $( TOOLS_DIR64) ) /lib/pkgconfig \
CC = $( CC_QUOTED) \
CXX = $( CXX_QUOTED)
2018-08-21 03:11:58 +03:00
# 32-bit configure
$(WINE_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
2019-08-22 22:44:30 +03:00
$(WINE_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) | faudio 32 vkd 3d 32 $( WINE_OBJ 32) bison 32
2018-08-21 03:11:58 +03:00
cd $( dir $@ ) && \
../$( WINE) /configure \
--without-curses \
2019-11-20 10:53:46 +03:00
--disable-tests \
--prefix= $( abspath $( WINE_DST32) ) \
STRIP = $( STRIP_QUOTED) \
2019-11-26 23:12:09 +03:00
BISON = $( abspath $( BISON_BIN32) ) \
2019-11-20 10:53:46 +03:00
CFLAGS = " -I $( abspath $( TOOLS_DIR32) ) /include -g $( COMMON_FLAGS) " \
2019-12-10 18:19:37 +03:00
CXXFLAGS = " -I $( abspath $( TOOLS_DIR32) ) /include -g $( COMMON_FLAGS) -std=c++17 " \
2019-11-20 10:53:46 +03:00
LDFLAGS = -L$( abspath $( TOOLS_DIR32) ) /lib \
PKG_CONFIG_PATH = $( abspath $( TOOLS_DIR32) ) /lib/pkgconfig \
CC = $( CC_QUOTED) \
CXX = $( CXX_QUOTED)
2018-08-21 03:11:58 +03:00
## wine goals
WINE_TARGETS = wine wine_configure wine32 wine64 wine_configure32 wine_configure64
ALL_TARGETS += $( WINE_TARGETS)
GOAL_TARGETS += wine
.PHONY : $( WINE_TARGETS )
wine_configure : $( WINE_CONFIGURE_FILES 32) $( WINE_CONFIGURE_FILES 64)
wine_configure64 : $( WINE_CONFIGURE_FILES 64)
wine_configure32 : $( WINE_CONFIGURE_FILES 32)
wine : wine 32 wine 64
# WINE_OUT and WINE_BUILDTOOLS are outputs needed by other rules, though we don't explicitly track all state here --
# make all or make wine are needed to ensure all deps are up to date, this just ensures 'make dist' or 'make vrclient'
# will drag in wine if you've never built wine.
.INTERMEDIATE : wine 64-intermediate wine 32-intermediate
$(WINE_BUILDTOOLS64) $(WINE_OUT) wine64 : wine 64-intermediate
wine64-intermediate : SHELL = $( CONTAINER_SHELL 64)
wine64-intermediate : $( WINE_CONFIGURE_FILES 64)
2019-11-26 23:12:09 +03:00
+$( MAKE) -C $( WINE_OBJ64) $( WINE_COMMON_MAKE_ARGS)
2018-10-17 17:54:49 +03:00
+$( MAKE) -C $( WINE_OBJ64) $( WINE_COMMON_MAKE_ARGS) install-lib
+$( MAKE) -C $( WINE_OBJ64) $( WINE64_MAKE_ARGS) install-lib install-dev
2019-09-27 22:28:02 +03:00
if [ " $( UNSTRIPPED_BUILD) " = = "" ] ; then rm -rf $( DST_DIR) /lib64/wine/.debug; fi
if [ " $( UNSTRIPPED_BUILD) " != "" ] ; then make -C $( WINE_OBJ64) $( WINE64_MAKE_ARGS) install-cross-debug; cp -a $( TOOLS_DIR64) /lib64/wine/.debug $( DST_DIR) /lib64/wine/; fi
2018-10-17 17:54:49 +03:00
rm -f $( DST_DIR) /bin/{ msiexec,notepad,regedit,regsvr32,wineboot,winecfg,wineconsole,winedbg,winefile,winemine,winepath}
rm -rf $( DST_DIR) /share/man/
2018-08-21 03:11:58 +03:00
## This installs 32-bit stuff manually, see
## https://wiki.winehq.org/Packaging#WoW64_Workarounds
$(WINE_BUILDTOOLS32) wine32 : wine 32-intermediate
wine32-intermediate : SHELL = $( CONTAINER_SHELL 32)
wine32-intermediate : $( WINE_CONFIGURE_FILES 32)
2019-11-26 23:12:09 +03:00
+$( MAKE) -C $( WINE_OBJ32) $( WINE_COMMON_MAKE_ARGS)
2018-10-17 17:54:49 +03:00
+$( MAKE) -C $( WINE_OBJ32) $( WINE_COMMON_MAKE_ARGS) install-lib
+$( MAKE) -C $( WINE_OBJ32) $( WINE32_MAKE_ARGS) install-lib install-dev
mkdir -p $( DST_DIR) /{ lib,bin}
cp -a $( WINE_DST32) /lib $( DST_DIR) /
cp -a $( WINE_DST32) /bin/wine $( DST_DIR) /bin/
cp -a $( WINE_DST32) /bin/wine-preloader $( DST_DIR) /bin/
2019-09-27 22:28:02 +03:00
if [ " $( UNSTRIPPED_BUILD) " = = "" ] ; then rm -rf $( DST_DIR) /lib/wine/.debug; fi
if [ " $( UNSTRIPPED_BUILD) " != "" ] ; then make -C $( WINE_OBJ32) $( WINE32_MAKE_ARGS) install-cross-debug; cp -a $( TOOLS_DIR32) /lib/wine/.debug $( DST_DIR) /lib/wine/; fi
2018-08-21 03:11:58 +03:00
##
## vrclient
##
## Create & configure object directory for vrclient
VRCLIENT_CONFIGURE_FILES32 := $( VRCLIENT_OBJ32) /Makefile
VRCLIENT_CONFIGURE_FILES64 := $( VRCLIENT_OBJ64) /Makefile
# The source directory for vrclient32 is a synthetic symlink clone of the oddly named vrclient_x64 with the spec files
# renamed.
$(VRCLIENT32) : $( VRCLIENT ) $( MAKEFILE_DEP )
rm -rf ./$( VRCLIENT32)
mkdir -p $( VRCLIENT32) /vrclient
cd $( VRCLIENT32) /vrclient && \
ln -sfv ../../$( VRCLIENT) /vrclient_x64/*.{ c,cpp,dat,h,spec} .
mv $( VRCLIENT32) /vrclient/vrclient_x64.spec $( VRCLIENT32) /vrclient/vrclient.spec
# 64bit-configure
$(VRCLIENT_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(VRCLIENT_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) $( VRCLIENT ) $( VRCLIENT ) /vrclient_x 64 | $( VRCLIENT_OBJ 64) $( WINEMAKER )
cd $( VRCLIENT) && \
$( WINEMAKER) --nosource-fix --nolower-include --nodlls --nomsvcrt \
--nosource-fix --nolower-include --nodlls --nomsvcrt \
-I" $( abspath $( TOOLS_DIR64) ) " /include/ \
-I" $( abspath $( TOOLS_DIR64) ) " /include/wine/ \
-I" $( abspath $( TOOLS_DIR64) ) " /include/wine/windows/ \
-I" $( abspath $( VRCLIENT) ) " \
-L" $( abspath $( TOOLS_DIR64) ) " /lib64/ \
-L" $( abspath $( TOOLS_DIR64) ) " /lib64/wine/ \
--dll vrclient_x64 && \
cp ./vrclient_x64/Makefile $( abspath $( dir $@ ) ) && \
echo >> $( abspath $( dir $@ ) ) /Makefile 'SRCDIR := ../$(VRCLIENT)/vrclient_x64' && \
echo >> $( abspath $( dir $@ ) ) /Makefile 'vpath % $$(SRCDIR)' && \
echo >> $( abspath $( dir $@ ) ) /Makefile 'vrclient_x64_dll_LDFLAGS := $$(patsubst %.spec,$$(SRCDIR)/%.spec,$$(vrclient_x64_dll_LDFLAGS))'
# 32-bit configure
$(VRCLIENT_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(VRCLIENT_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) $( VRCLIENT 32) | $( VRCLIENT_OBJ 32) $( WINEMAKER )
$( WINEMAKER) --nosource-fix --nolower-include --nodlls --nomsvcrt \
--wine32 \
-I" $( abspath $( TOOLS_DIR32) ) " /include/ \
-I" $( abspath $( TOOLS_DIR32) ) " /include/wine/ \
-I" $( abspath $( TOOLS_DIR32) ) " /include/wine/windows/ \
-I" $( abspath $( VRCLIENT) ) " \
-L" $( abspath $( TOOLS_DIR32) ) " /lib/ \
-L" $( abspath $( TOOLS_DIR32) ) " /lib/wine/ \
--dll $( VRCLIENT32) /vrclient && \
cp $( VRCLIENT32) /vrclient/Makefile $( dir $@ ) && \
echo >> $( dir $@ ) /Makefile 'SRCDIR := ../$(VRCLIENT32)/vrclient' && \
echo >> $( dir $@ ) /Makefile 'vpath % $$(SRCDIR)' && \
echo >> $( dir $@ ) /Makefile 'vrclient_dll_LDFLAGS := -m32 $$(patsubst %.spec,$$(SRCDIR)/%.spec,$$(vrclient_dll_LDFLAGS))'
## vrclient goals
VRCLIENT_TARGETS = vrclient vrclient_configure vrclient32 vrclient64 vrclient_configure32 vrclient_configure64
ALL_TARGETS += $( VRCLIENT_TARGETS)
GOAL_TARGETS_LIBS += vrclient
.PHONY : $( VRCLIENT_TARGETS )
vrclient_configure : $( VRCLIENT_CONFIGURE_FILES 32) $( VRCLIENT_CONFIGURE_FILES 64)
vrclient_configure32 : $( VRCLIENT_CONFIGURE_FILES 32)
vrclient_configure64 : $( VRCLIENT_CONFIGURE_FILES 64)
vrclient : vrclient 32 vrclient 64
vrclient64 : SHELL = $( CONTAINER_SHELL 64)
vrclient64 : $( VRCLIENT_CONFIGURE_FILES 64) | $( WINE_BUILDTOOLS 64) $( filter $ ( MAKECMDGOALS ) ,wine 64 wine 32 wine )
2018-10-18 17:47:38 +03:00
+env CXXFLAGS = " -Wno-attributes -std=c++0x $( COMMON_FLAGS) -g " CFLAGS = " $( COMMON_FLAGS) -g " PATH = " $( abspath $( TOOLS_DIR64) ) /bin: $( PATH) " \
2018-10-17 17:54:49 +03:00
$( MAKE) -C $( VRCLIENT_OBJ64)
2018-08-21 03:11:58 +03:00
cd $( VRCLIENT_OBJ64) && \
PATH = $( abspath $( TOOLS_DIR64) ) /bin:$( PATH) \
winebuild --dll --fake-module -E ../$( VRCLIENT) /vrclient_x64/vrclient_x64.spec -o vrclient_x64.dll.fake && \
[ x" $( STRIP) " = x ] || $( STRIP) ../$( VRCLIENT_OBJ64) /vrclient_x64.dll.so && \
2018-10-18 01:44:21 +03:00
mkdir -pv ../$( DST_DIR) /lib64/wine/fakedlls && \
2018-08-21 03:11:58 +03:00
cp -a ../$( VRCLIENT_OBJ64) /vrclient_x64.dll.so ../$( DST_DIR) /lib64/wine/ && \
cp -a ../$( VRCLIENT_OBJ64) /vrclient_x64.dll.fake ../$( DST_DIR) /lib64/wine/fakedlls/vrclient_x64.dll
vrclient32 : SHELL = $( CONTAINER_SHELL 32)
vrclient32 : $( VRCLIENT_CONFIGURE_FILES 32) | $( WINE_BUILDTOOLS 32) $( filter $ ( MAKECMDGOALS ) ,wine 64 wine 32 wine )
2018-10-18 17:47:38 +03:00
+env LDFLAGS = "-m32" CXXFLAGS = " -m32 -Wno-attributes -std=c++0x $( COMMON_FLAGS) -g " CFLAGS = " -m32 $( COMMON_FLAGS) -g " PATH = " $( abspath $( TOOLS_DIR32) ) /bin: $( PATH) " \
2018-10-17 17:54:49 +03:00
$( MAKE) -C $( VRCLIENT_OBJ32)
2018-08-21 03:11:58 +03:00
cd $( VRCLIENT_OBJ32) && \
PATH = $( abspath $( TOOLS_DIR32) ) /bin:$( PATH) \
winebuild --dll --fake-module -E ../$( VRCLIENT32) /vrclient/vrclient.spec -o vrclient.dll.fake && \
[ x" $( STRIP) " = x ] || $( STRIP) ../$( VRCLIENT_OBJ32) /vrclient.dll.so && \
2018-10-18 01:44:21 +03:00
mkdir -pv ../$( DST_DIR) /lib/wine/fakedlls && \
2018-08-21 03:11:58 +03:00
cp -a ../$( VRCLIENT_OBJ32) /vrclient.dll.so ../$( DST_DIR) /lib/wine/ && \
cp -a ../$( VRCLIENT_OBJ32) /vrclient.dll.fake ../$( DST_DIR) /lib/wine/fakedlls/vrclient.dll
##
2018-12-20 18:16:21 +03:00
## cmake -- necessary for FAudio, not part of steam runtime
2018-08-21 03:11:58 +03:00
##
# TODO Don't bother with this in native mode
## Create & configure object directory for cmake
CMAKE_CONFIGURE_FILES32 := $( CMAKE_OBJ32) /Makefile
CMAKE_CONFIGURE_FILES64 := $( CMAKE_OBJ64) /Makefile
# 64-bit configure
$(CMAKE_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(CMAKE_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) | $( CMAKE_OBJ 64)
cd " $( CMAKE_OBJ64) " && \
../$( CMAKE) /configure --parallel= $( SUBMAKE_JOBS) --prefix= $( abspath $( CMAKE_OBJ64) ) /built
# 32-bit configure
$(CMAKE_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(CMAKE_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) | $( CMAKE_OBJ 32)
cd " $( CMAKE_OBJ32) " && \
../$( CMAKE) /configure --parallel= $( SUBMAKE_JOBS) --prefix= $( abspath $( CMAKE_OBJ32) ) /built
## cmake goals
CMAKE_TARGETS = cmake cmake_configure cmake32 cmake64 cmake_configure32 cmake_configure64
ALL_TARGETS += $( CMAKE_TARGETS)
.PHONY : $( CMAKE_TARGETS )
cmake_configure : $( CMAKE_CONFIGURE_FILES 32) $( CMAKE_CONFIGURE_FILES 64)
cmake_configure32 : $( CMAKE_CONFIGURE_FILES 32)
cmake_configure64 : $( CMAKE_CONFIGURE_FILES 64)
cmake : cmake 32 cmake 64
# These have multiple targets that come from one invocation. The way to do that is to have both targets on a single
# intermediate.
.INTERMEDIATE : cmake 64-intermediate cmake 32-intermediate
$(CMAKE_BIN64) cmake64 : cmake 64-intermediate
cmake64-intermediate : SHELL = $( CONTAINER_SHELL 64)
cmake64-intermediate : $( CMAKE_CONFIGURE_FILES 64) $( filter $ ( MAKECMDGOALS ) ,cmake 64)
2018-10-17 17:54:49 +03:00
+$( MAKE) -C $( CMAKE_OBJ64)
+$( MAKE) -C $( CMAKE_OBJ64) install
touch $( CMAKE_BIN64)
2018-08-21 03:11:58 +03:00
$(CMAKE_BIN32) cmake32 : cmake 32-intermediate
cmake32-intermediate : SHELL = $( CONTAINER_SHELL 32)
cmake32-intermediate : $( CMAKE_CONFIGURE_FILES 32) $( filter $ ( MAKECMDGOALS ) ,cmake 32)
2018-10-17 17:54:49 +03:00
+$( MAKE) -C $( CMAKE_OBJ32)
+$( MAKE) -C $( CMAKE_OBJ32) install
touch $( CMAKE_BIN32)
2018-08-21 03:11:58 +03:00
2019-05-30 10:02:18 +03:00
##
## bison -- necessary for wine, steam runtime version too old
##
# TODO Don't bother with this in native mode
$(BISON) :
if [ -e " $( SRCDIR) /../bison/ $( BISON_TARBALL) " ] ; then \
mkdir -p $( dir $@ ) ; \
tar -xf " $( SRCDIR) /../bison/ $( BISON_TARBALL) " -C " $( dir $@ ) " ; \
else \
mkdir -p $( SRCDIR) /contrib/; \
if [ ! -e " $( SRCDIR) /contrib/ $( BISON_TARBALL) " ] ; then \
echo " >>>> Downloading bison. To avoid this in future, put it here: $( SRCDIR) /../bison/ $( BISON_TARBALL) " ; \
2019-06-19 20:23:26 +03:00
wget -O " $( SRCDIR) /contrib/ $( BISON_TARBALL) " " $( BISON_TARBALL_URL) " ; \
2019-05-30 10:02:18 +03:00
fi ; \
tar -xf " $( SRCDIR) /contrib/ $( BISON_TARBALL) " -C " $( dir $@ ) " ; \
fi
BISON_CONFIGURE_FILES32 := $( BISON_OBJ32) /Makefile
BISON_CONFIGURE_FILES64 := $( BISON_OBJ64) /Makefile
# 64-bit configure
$(BISON_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(BISON_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) $( BISON ) | $( BISON_OBJ 64)
cd " $( BISON_OBJ64) " && \
2019-11-20 10:53:46 +03:00
../$( BISON) /configure --prefix= $( abspath $( BISON_OBJ64) ) /built LIBS = '-lrt'
2019-05-30 10:02:18 +03:00
# 32-bit configure
$(BISON_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(BISON_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) $( BISON ) | $( BISON_OBJ 32)
cd " $( BISON_OBJ32) " && \
2019-11-20 10:53:46 +03:00
../$( BISON) /configure --prefix= $( abspath $( BISON_OBJ32) ) /built LIBS = '-lrt'
2019-05-30 10:02:18 +03:00
## bison goals
BISON_TARGETS = bison bison_configure bison32 bison64 bison_configure32 bison_configure64
ALL_TARGETS += $( BISON_TARGETS)
.PHONY : $( BISON_TARGETS )
bison_configure : $( BISON_CONFIGURE_FILES 32) $( BISON_CONFIGURE_FILES 64)
bison_configure32 : $( BISON_CONFIGURE_FILES 32)
bison_configure64 : $( BISON_CONFIGURE_FILES 64)
bison : bison 32 bison 64
# These have multiple targets that come from one invocation. The way to do that is to have both targets on a single
# intermediate.
.INTERMEDIATE : bison 64-intermediate bison 32-intermediate
$(BISON_BIN64) bison64 : bison 64-intermediate
bison64-intermediate : SHELL = $( CONTAINER_SHELL 64)
bison64-intermediate : $( BISON_CONFIGURE_FILES 64) $( filter $ ( MAKECMDGOALS ) ,bison 64)
+$( MAKE) -C $( BISON_OBJ64)
+$( MAKE) -C $( BISON_OBJ64) install
touch $( BISON_BIN64)
$(BISON_BIN32) bison32 : bison 32-intermediate
bison32-intermediate : SHELL = $( CONTAINER_SHELL 32)
bison32-intermediate : $( BISON_CONFIGURE_FILES 32) $( filter $ ( MAKECMDGOALS ) ,bison 32)
+$( MAKE) -C $( BISON_OBJ32)
+$( MAKE) -C $( BISON_OBJ32) install
touch $( BISON_BIN32)
2018-08-21 03:11:58 +03:00
##
## dxvk
##
# TODO Builds outside container, could simplify a lot if it did not.
## Create & configure object directory for dxvk
i f n e q ( $( NO_DXVK ) , 1 ) # May be disabled by configure
DXVK_CONFIGURE_FILES32 := $( DXVK_OBJ32) /build.ninja
DXVK_CONFIGURE_FILES64 := $( DXVK_OBJ64) /build.ninja
2018-10-19 17:44:38 +03:00
# 64bit-configure. Remove coredata file if already configured (due to e.g. makefile changing)
2018-10-25 15:52:56 +03:00
$(DXVK_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) $( DXVK ) /build -win 64.txt | $( DXVK_OBJ 64)
2018-10-19 17:44:38 +03:00
if [ -e " $( abspath $( DXVK_OBJ64) ) " /build.ninja ] ; then \
rm -f " $( abspath $( DXVK_OBJ64) ) " /meson-private/coredata.dat; \
fi
cd " $( abspath $( DXVK) ) " && \
PATH = " $( abspath $( SRCDIR) ) /glslang/bin/: $( PATH) " \
2019-09-27 22:28:02 +03:00
meson --prefix= " $( abspath $( DXVK_OBJ64) ) " --cross-file " $( abspath $( DXVK) ) /build-win64.txt " $( MESON_STRIP_ARG) --buildtype= release " $( abspath $( DXVK_OBJ64) ) "
2018-08-21 03:11:58 +03:00
2018-10-19 17:44:38 +03:00
# 32-bit configure. Remove coredata file if already configured (due to e.g. makefile changing)
2018-10-25 15:52:56 +03:00
$(DXVK_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) $( DXVK ) /build -win 32.txt | $( DXVK_OBJ 32)
2018-10-19 17:44:38 +03:00
if [ -e " $( abspath $( DXVK_OBJ32) ) " /build.ninja ] ; then \
rm -f " $( abspath $( DXVK_OBJ32) ) " /meson-private/coredata.dat; \
fi
cd " $( abspath $( DXVK) ) " && \
PATH = " $( abspath $( SRCDIR) ) /glslang/bin/: $( PATH) " \
2019-09-27 22:28:02 +03:00
meson --prefix= " $( abspath $( DXVK_OBJ32) ) " --cross-file " $( abspath $( DXVK) ) /build-win32.txt " $( MESON_STRIP_ARG) --buildtype= release " $( abspath $( DXVK_OBJ32) ) "
2018-08-21 03:11:58 +03:00
## dxvk goals
DXVK_TARGETS = dxvk dxvk_configure dxvk32 dxvk64 dxvk_configure32 dxvk_configure64
ALL_TARGETS += $( DXVK_TARGETS)
GOAL_TARGETS_LIBS += dxvk
.PHONY : $( DXVK_TARGETS )
dxvk_configure : $( DXVK_CONFIGURE_FILES 32) $( DXVK_CONFIGURE_FILES 64)
dxvk_configure64 : $( DXVK_CONFIGURE_FILES 64)
dxvk_configure32 : $( DXVK_CONFIGURE_FILES 32)
dxvk : dxvk 32 dxvk 64
dxvk64 : $( DXVK_CONFIGURE_FILES 64)
2018-10-17 17:54:49 +03:00
env PATH = " $( abspath $( SRCDIR) ) /glslang/bin/: $( PATH) " ninja -C " $( DXVK_OBJ64) " install
2018-10-15 19:04:58 +03:00
mkdir -p " $( DST_DIR) /lib64/wine/dxvk "
cp " $( DXVK_OBJ64) " /bin/dxgi.dll " $( DST_DIR) " /lib64/wine/dxvk
cp " $( DXVK_OBJ64) " /bin/d3d11.dll " $( DST_DIR) " /lib64/wine/dxvk
2018-10-15 19:40:33 +03:00
cp " $( DXVK_OBJ64) " /bin/d3d10.dll " $( DST_DIR) " /lib64/wine/dxvk
cp " $( DXVK_OBJ64) " /bin/d3d10_1.dll " $( DST_DIR) " /lib64/wine/dxvk
cp " $( DXVK_OBJ64) " /bin/d3d10core.dll " $( DST_DIR) " /lib64/wine/dxvk
2019-12-18 16:50:38 +03:00
cp " $( DXVK_OBJ64) " /bin/d3d9.dll " $( DST_DIR) " /lib64/wine/dxvk
2019-12-10 18:28:14 +03:00
cp " $( DXVK_OBJ64) " /bin/dxvk_config.dll " $( DST_DIR) " /lib64/wine/dxvk
2018-10-25 21:55:20 +03:00
if test -e $( SRCDIR) /.git; then ( cd $( SRCDIR) && git submodule status -- dxvk ) > " $( DST_DIR) " /lib64/wine/dxvk/version; fi
2018-08-21 03:11:58 +03:00
dxvk32 : $( DXVK_CONFIGURE_FILES 32)
2018-10-17 17:54:49 +03:00
env PATH = " $( abspath $( SRCDIR) ) /glslang/bin/: $( PATH) " ninja -C " $( DXVK_OBJ32) " install
2018-10-15 19:04:58 +03:00
mkdir -p " $( DST_DIR) " /lib/wine/dxvk
cp " $( DXVK_OBJ32) " /bin/dxgi.dll " $( DST_DIR) " /lib/wine/dxvk/
cp " $( DXVK_OBJ32) " /bin/d3d11.dll " $( DST_DIR) " /lib/wine/dxvk/
2018-10-15 19:40:33 +03:00
cp " $( DXVK_OBJ32) " /bin/d3d10.dll " $( DST_DIR) " /lib/wine/dxvk/
cp " $( DXVK_OBJ32) " /bin/d3d10_1.dll " $( DST_DIR) " /lib/wine/dxvk/
cp " $( DXVK_OBJ32) " /bin/d3d10core.dll " $( DST_DIR) " /lib/wine/dxvk/
2019-12-18 16:50:38 +03:00
cp " $( DXVK_OBJ32) " /bin/d3d9.dll " $( DST_DIR) " /lib/wine/dxvk/
2019-12-10 18:28:14 +03:00
cp " $( DXVK_OBJ32) " /bin/dxvk_config.dll " $( DST_DIR) " /lib/wine/dxvk
2018-10-25 21:55:20 +03:00
if test -e $( SRCDIR) /.git; then ( cd $( SRCDIR) && git submodule status -- dxvk ) > " $( DST_DIR) " /lib/wine/dxvk/version; fi
2018-08-21 03:11:58 +03:00
e n d i f # NO_DXVK
2019-08-22 22:44:30 +03:00
# Vulkan-Headers
VULKAN_H_CONFIGURE_FILES32 := $( VULKAN_H_OBJ32) /Makefile
VULKAN_H_CONFIGURE_FILES64 := $( VULKAN_H_OBJ64) /Makefile
$(VULKAN_H_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(VULKAN_H_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) $( CMAKE_BIN 32) $( VULKAN_HEADERS ) /CMakeLists .txt | $( VULKAN_H_OBJ 32)
cd $( abspath $( VULKAN_H_OBJ32) ) && \
../$( CMAKE_BIN32) -DCMAKE_INSTALL_PREFIX= $( abspath $( TOOLS_DIR32) ) $( abspath $( VULKAN_HEADERS) )
$(VULKAN_H_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(VULKAN_H_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) $( CMAKE_BIN 64) $( VULKAN_HEADERS ) /CMakeLists .txt | $( VULKAN_H_OBJ 64)
cd $( abspath $( VULKAN_H_OBJ64) ) && \
../$( CMAKE_BIN64) -DCMAKE_INSTALL_PREFIX= $( abspath $( TOOLS_DIR64) ) $( abspath $( VULKAN_HEADERS) )
$(VULKAN_H32) : SHELL = $( CONTAINER_SHELL 32)
$(VULKAN_H32) : $( VULKAN_H_CONFIGURE_FILES 32) | $( VULKAN_H_OBJ 32)
cd $( abspath $( VULKAN_H_OBJ32) ) && \
../$( CMAKE_BIN32) --build . --target install
$(VULKAN_H64) : SHELL = $( CONTAINER_SHELL 64)
$(VULKAN_H64) : $( VULKAN_H_CONFIGURE_FILES 64) | $( VULKAN_H_OBJ 64)
cd $( abspath $( VULKAN_H_OBJ64) ) && \
../$( CMAKE_BIN64) --build . --target install
# SPIRV-Headers
SPIRV_H_CONFIGURE_FILES32 := $( SPIRV_H_OBJ32) /Makefile
SPIRV_H_CONFIGURE_FILES64 := $( SPIRV_H_OBJ64) /Makefile
$(SPIRV_H_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(SPIRV_H_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) $( CMAKE_BIN 32) $( SPIRV_HEADERS ) /CMakeLists .txt | $( SPIRV_H_OBJ 32)
cd $( abspath $( SPIRV_H_OBJ32) ) && \
../$( CMAKE_BIN32) -DCMAKE_INSTALL_PREFIX= $( abspath $( TOOLS_DIR32) ) $( abspath $( SPIRV_HEADERS) )
$(SPIRV_H_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(SPIRV_H_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) $( CMAKE_BIN 64) $( SPIRV_HEADERS ) /CMakeLists .txt | $( SPIRV_H_OBJ 64)
cd $( abspath $( SPIRV_H_OBJ64) ) && \
../$( CMAKE_BIN64) -DCMAKE_INSTALL_PREFIX= $( abspath $( TOOLS_DIR64) ) $( abspath $( SPIRV_HEADERS) )
$(SPIRV_H32) : SHELL = $( CONTAINER_SHELL 32)
$(SPIRV_H32) : $( SPIRV_H_CONFIGURE_FILES 32)
cd $( abspath $( SPIRV_H_OBJ32) ) && \
../$( CMAKE_BIN32) --build . --target install
$(SPIRV_H64) : SHELL = $( CONTAINER_SHELL 64)
$(SPIRV_H64) : $( SPIRV_H_CONFIGURE_FILES 64)
cd $( abspath $( SPIRV_H_OBJ64) ) && \
../$( CMAKE_BIN64) --build . --target install
# widl; required for vkd3d, which is built before wine
WINEWIDL_CONFIGURE_FILES64 := $( WINEWIDL_OBJ64) /Makefile
WINEWIDL_CONFIGURE_FILES32 := $( WINEWIDL_OBJ32) /Makefile
$(WINEWIDL_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(WINEWIDL_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) | $( WINEWIDL_OBJ 32) bison 32
cd $( dir $@ ) && \
../$( WINE) /configure \
--without-curses \
2019-11-20 10:53:46 +03:00
--disable-tests \
STRIP = $( STRIP_QUOTED) \
BISON = $( abspath $( BISON_BIN32) ) \
CFLAGS = -I$( abspath $( TOOLS_DIR64) ) " /include -g $( COMMON_FLAGS) " \
LDFLAGS = -L$( abspath $( TOOLS_DIR32) ) /lib \
PKG_CONFIG_PATH = $( abspath $( TOOLS_DIR32) ) /lib/pkgconfig \
CC = $( CC_QUOTED) \
CXX = $( CXX_QUOTED)
2019-08-22 22:44:30 +03:00
$(WINEWIDL32) : SHELL = $( CONTAINER_SHELL 32)
$(WINEWIDL32) : $( WINEWIDL_CONFIGURE_FILES 32)
cd $( WINEWIDL_OBJ32) && \
make tools/widl
$(WINEWIDL_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(WINEWIDL_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) | $( WINEWIDL_OBJ 64) bison 64
cd $( dir $@ ) && \
../$( WINE) /configure \
--without-curses \
2019-11-20 10:53:46 +03:00
--enable-win64 \
--disable-tests \
STRIP = $( STRIP_QUOTED) \
BISON = $( abspath $( BISON_BIN64) ) \
CFLAGS = -I$( abspath $( TOOLS_DIR64) ) " /include -g $( COMMON_FLAGS) " \
LDFLAGS = -L$( abspath $( TOOLS_DIR64) ) /lib \
PKG_CONFIG_PATH = $( abspath $( TOOLS_DIR64) ) /lib/pkgconfig \
CC = $( CC_QUOTED) \
CXX = $( CXX_QUOTED)
2019-08-22 22:44:30 +03:00
$(WINEWIDL64) : SHELL = $( CONTAINER_SHELL 64)
$(WINEWIDL64) : $( WINEWIDL_CONFIGURE_FILES 64)
cd $( WINEWIDL_OBJ64) && \
make tools/widl
# VKD3D
VKD3D_CONFIGURE_FILES32 := $( VKD3D_OBJ32) /Makefile
VKD3D_CONFIGURE_FILES64 := $( VKD3D_OBJ64) /Makefile
#use host autotools to generate configure script
$(VKD3D)/configure : SHELL = /bin /bash
$(VKD3D)/configure : $( MAKEFILE_DEP ) $( VKD 3D ) /configure .ac
cd $( abspath $( VKD3D) ) && ./autogen.sh
$(VKD3D_CONFIGURE_FILES32) : SHELL = $( CONTAINER_SHELL 32)
$(VKD3D_CONFIGURE_FILES32) : $( MAKEFILE_DEP ) $( VULKAN_H 32) $( SPIRV_H 32) $( VKD 3D ) /configure $( WINEWIDL 32) | $( VKD 3D_OBJ 32)
cd $( abspath $( VKD3D_OBJ32) ) && \
2019-11-20 10:53:46 +03:00
$( abspath $( VKD3D) ) /configure \
--disable-tests \
--prefix= $( abspath $( TOOLS_DIR32) ) \
CFLAGS = " -I $( abspath $( TOOLS_DIR32) ) /include -g $( COMMON_FLAGS) -DNDEBUG " \
LDFLAGS = -L$( abspath $( TOOLS_DIR32) ) /lib \
WIDL = " $( abspath $( WINEWIDL32) ) "
2019-08-22 22:44:30 +03:00
vkd3d32 : SHELL = $( CONTAINER_SHELL 32)
vkd3d32 : $( VKD 3D_CONFIGURE_FILES 32)
cd $( abspath $( VKD3D_OBJ32) ) && \
2019-11-04 19:20:59 +03:00
make V = 1 && make $( VKD3D_INSTALL_TARGET) && \
2019-08-22 22:44:30 +03:00
mkdir -p $( abspath $( DST_DIR) ) /lib/ && \
cp -a $( abspath $( TOOLS_DIR32) ) /lib/libvkd3d*.so* $( abspath $( DST_DIR) ) /lib/
$(VKD3D_CONFIGURE_FILES64) : SHELL = $( CONTAINER_SHELL 64)
$(VKD3D_CONFIGURE_FILES64) : $( MAKEFILE_DEP ) $( VULKAN_H 64) $( SPIRV_H 64) $( VKD 3D ) /configure $( WINEWIDL 64) | $( VKD 3D_OBJ 64)
cd $( abspath $( VKD3D_OBJ64) ) && \
2019-11-20 10:53:46 +03:00
$( abspath $( VKD3D) ) /configure \
--disable-tests \
--prefix= $( abspath $( TOOLS_DIR64) ) \
CFLAGS = " -I $( abspath $( TOOLS_DIR64) ) /include -g $( COMMON_FLAGS) -DNDEBUG " \
LDFLAGS = -L$( abspath $( TOOLS_DIR64) ) /lib \
WIDL = " $( abspath $( WINEWIDL64) ) "
2019-08-22 22:44:30 +03:00
vkd3d64 : SHELL = $( CONTAINER_SHELL 64)
vkd3d64 : $( VKD 3D_CONFIGURE_FILES 64)
cd $( abspath $( VKD3D_OBJ64) ) && \
2019-11-04 19:20:59 +03:00
make V = 1 && make $( VKD3D_INSTALL_TARGET) && \
2019-08-22 22:44:30 +03:00
mkdir -p $( abspath $( DST_DIR) ) /lib64/ && \
cp -a $( abspath $( TOOLS_DIR64) ) /lib/libvkd3d*.so* $( abspath $( DST_DIR) ) /lib64/
vkd3d : vkd 3d 32 vkd 3d 64
2018-08-21 03:11:58 +03:00
# TODO Tests
# build_vrclient64_tests
# build_vrclient32_tests
2018-10-12 14:20:49 +03:00
ALL_TARGETS += fonts
GOAL_TARGETS += fonts
.PHONY : fonts
FONTFORGE = fontforge -quiet
FONTSCRIPT = $( FONTS) /scripts/generatefont.pe
FONTLINKPATH = ../../../../fonts
LIBERATION_SRCDIR = $( FONTS) /liberation-fonts/src
2019-08-16 21:06:09 +03:00
SOURCE_HAN_SANS_SRCDIR = $( FONTS) /source-han-sans
2018-10-12 14:20:49 +03:00
LIBERATION_SANS_REGULAR_SFD = LiberationSans-Regular.sfd
LIBERATION_SANS_BOLD_SFD = LiberationSans-Bold.sfd
LIBERATION_SERIF_REGULAR_SFD = LiberationSerif-Regular.sfd
LIBERATION_MONO_REGULAR_SFD = LiberationMono-Regular.sfd
2019-08-16 21:06:09 +03:00
SOURCE_HAN_SANS_REGULAR_CIDFONTINFO = $( SOURCE_HAN_SANS_SRCDIR) /cidfontinfo.OTC.SC
SOURCE_HAN_SANS_REGULAR_CIDFONT = $( SOURCE_HAN_SANS_SRCDIR) /cidfont.ps.OTC.SC
SOURCE_HAN_SANS_REGULAR_FEATURES = $( SOURCE_HAN_SANS_SRCDIR) /features.OTC.SC
SOURCE_HAN_SANS_REGULAR_SEQUENCES = $( SOURCE_HAN_SANS_SRCDIR) /SourceHanSans_CN_sequences.txt
SOURCE_HAN_SANS_REGULAR_UNISOURCE = $( SOURCE_HAN_SANS_SRCDIR) /UniSourceHanSansCN-UTF32-H
YAHEI_MENUNAMEDB = $( FONTS) /patches/YaHei-FontMenuNameDB
2018-10-12 14:20:49 +03:00
LIBERATION_SANS_REGULAR_TTF = $( addprefix $( FONTS_OBJ) /, $( LIBERATION_SANS_REGULAR_SFD:.sfd= .ttf) )
LIBERATION_SANS_BOLD_TTF = $( addprefix $( FONTS_OBJ) /, $( LIBERATION_SANS_BOLD_SFD:.sfd= .ttf) )
LIBERATION_SERIF_REGULAR_TTF = $( addprefix $( FONTS_OBJ) /, $( LIBERATION_SERIF_REGULAR_SFD:.sfd= .ttf) )
LIBERATION_MONO_REGULAR_TTF = $( addprefix $( FONTS_OBJ) /, $( LIBERATION_MONO_REGULAR_SFD:.sfd= .ttf) )
2019-08-16 21:06:09 +03:00
SOURCE_HAN_SANS_REGULAR_OTF = $( FONTS_OBJ) /SourceHanSansSCRegular.otf
2018-10-12 14:20:49 +03:00
LIBERATION_SFDS = $( LIBERATION_SANS_REGULAR_SFD) $( LIBERATION_SANS_BOLD_SFD) $( LIBERATION_SERIF_REGULAR_SFD) $( LIBERATION_MONO_REGULAR_SFD)
FONT_TTFS = $( LIBERATION_SANS_REGULAR_TTF) $( LIBERATION_SANS_BOLD_TTF) \
$( LIBERATION_SERIF_REGULAR_TTF) $( LIBERATION_MONO_REGULAR_TTF)
FONTS_SRC = $( FONT_TTFS:.ttf= .sfd)
2018-10-23 16:44:58 +03:00
#The use of "Arial" here is for compatibility with programs that require that exact string. This font is not Arial.
2018-10-12 14:20:49 +03:00
$(LIBERATION_SANS_REGULAR_TTF) : $( FONTS_SRC ) $( FONTSCRIPT )
$( FONTFORGE) -script $( FONTSCRIPT) $( @:.ttf= .sfd) "Arial" "Arial" "Arial"
2018-10-23 16:44:58 +03:00
#The use of "Arial" here is for compatibility with programs that require that exact string. This font is not Arial.
2018-10-12 14:20:49 +03:00
$(LIBERATION_SANS_BOLD_TTF) : $( FONTS_SRC ) $( FONTSCRIPT )
$( FONTFORGE) -script $( FONTSCRIPT) $( @:.ttf= .sfd) "Arial-Bold" "Arial" "Arial Bold"
2018-10-23 16:44:58 +03:00
#The use of "Times New Roman" here is for compatibility with programs that require that exact string. This font is not Times New Roman.
2018-10-12 14:20:49 +03:00
$(LIBERATION_SERIF_REGULAR_TTF) : $( FONTS_SRC ) $( FONTSCRIPT )
$( FONTFORGE) -script $( FONTSCRIPT) $( @:.ttf= .sfd) "TimesNewRoman" "Times New Roman" "Times New Roman"
2018-10-23 16:44:58 +03:00
#The use of "Courier New" here is for compatibility with programs that require that exact string. This font is not Courier New.
2018-10-12 14:20:49 +03:00
$(LIBERATION_MONO_REGULAR_TTF) : $( FONTS_SRC ) $( FONTSCRIPT )
patch $( @:.ttf= .sfd) $( FONTS) /patches/$( LIBERATION_MONO_REGULAR_SFD:.sfd= .patch)
$( FONTFORGE) -script $( FONTSCRIPT) $( @:.ttf= .sfd) "CourierNew" "Courier New" "Courier New"
2019-08-16 21:06:09 +03:00
#The use of "YaHei" for compatibility with programs that require that exact string. This font is not Microsoft YaHei.
$(SOURCE_HAN_SANS_REGULAR_OTF) : $( SOURCE_HAN_SANS_REGULAR_CIDFONTINFO ) $( SOURCE_HAN_SANS_REGULAR_CIDFONT ) \
$( SOURCE_HAN_SANS_REGULAR_FEATURES) $( SOURCE_HAN_SANS_REGULAR_SEQUENCES) $( SOURCE_HAN_SANS_REGULAR_UNISOURCE) $( YAHEI_MENUNAMEDB)
makeotf -f $( SOURCE_HAN_SANS_REGULAR_CIDFONT) -omitMacNames -ff $( SOURCE_HAN_SANS_REGULAR_FEATURES) \
-fi $( SOURCE_HAN_SANS_REGULAR_CIDFONTINFO) -mf $( YAHEI_MENUNAMEDB) -r -nS -cs 25 -ch $( SOURCE_HAN_SANS_REGULAR_UNISOURCE) \
-ci $( SOURCE_HAN_SANS_REGULAR_SEQUENCES) -o $( SOURCE_HAN_SANS_REGULAR_OTF)
tx -cff +S -no_futile $( SOURCE_HAN_SANS_REGULAR_CIDFONT) $( FONTS_OBJ) /CFF.OTC.SC
sfntedit -a CFF = $( FONTS_OBJ) /CFF.OTC.SC $( SOURCE_HAN_SANS_REGULAR_OTF)
2018-10-12 14:20:49 +03:00
$(FONTS_OBJ) :
mkdir -p $@
$(FONTS_SRC) : $( FONTS_OBJ )
cp -n $( addprefix $( LIBERATION_SRCDIR) /, $( LIBERATION_SFDS) ) $<
fonts : $( LIBERATION_SANS_REGULAR_TTF ) $( LIBERATION_SANS_BOLD_TTF ) \
2019-08-16 21:06:09 +03:00
$( LIBERATION_SERIF_REGULAR_TTF) $( LIBERATION_MONO_REGULAR_TTF) \
$( SOURCE_HAN_SANS_REGULAR_OTF) | $( FONTS_SRC)
2018-08-21 03:11:58 +03:00
##
## Targets
##
.PHONY : all all 64 all 32 default help targets
# Produce a working dist directory by default
default : all dist
.DEFAULT_GOAL := default
# For suffixes 64/32/_configure64/_configure32 automatically check if they exist compared to ALL_TARGETS and make
# all_configure32/etc aliases
GOAL_TARGETS64 := $( filter $( addsuffix 64,$( GOAL_TARGETS) ) ,$( ALL_TARGETS) )
GOAL_TARGETS32 := $( filter $( addsuffix 32,$( GOAL_TARGETS) ) ,$( ALL_TARGETS) )
GOAL_TARGETS_LIBS64 := $( filter $( addsuffix 64,$( GOAL_TARGETS_LIBS) ) ,$( ALL_TARGETS) )
GOAL_TARGETS_LIBS32 := $( filter $( addsuffix 32,$( GOAL_TARGETS_LIBS) ) ,$( ALL_TARGETS) )
GOAL_TARGETS_CONFIGURE := $( filter $( addsuffix _configure,$( GOAL_TARGETS) ) ,$( ALL_TARGETS) )
GOAL_TARGETS_CONFIGURE64 := $( filter $( addsuffix _configure64,$( GOAL_TARGETS) ) ,$( ALL_TARGETS) )
GOAL_TARGETS_CONFIGURE32 := $( filter $( addsuffix _configure32,$( GOAL_TARGETS) ) ,$( ALL_TARGETS) )
# Anything in all-targets that didn't end up in here
OTHER_TARGETS := $( filter-out $( ALL_TARGETS) ,$( GOAL_TARGETS) $( GOAL_TARGETS64) $( GOAL_TARGETS32) \
$( GOAL_TARGETS_LIBS64) $( GOAL_TARGETS_LIBS32) $( GOAL_TARGETS_CONFIGURE) \
$( GOAL_TARGETS_CONFIGURE64) $( GOAL_TARGETS_CONFIGURE32) )
help : targets
targets :
$( info Default targets ( make all) : $( strip $( GOAL_TARGETS) ) )
$( info Default targets ( make all_lib) : $( strip $( GOAL_TARGETS_LIBS) ) )
$( info Default targets ( make all_configure) : $( strip $( GOAL_TARGETS_CONFIGURE) ) )
$( info Default targets ( make all64) : $( strip $( GOAL_TARGETS64) ) )
$( info Default targets ( make all32) : $( strip $( GOAL_TARGETS32) ) )
$( info Default targets ( make all64_lib) : $( strip $( GOAL_TARGETS_LIBS64) ) )
$( info Default targets ( make all32_lib) : $( strip $( GOAL_TARGETS_LIBS32) ) )
$( info Reconfigure targets ( make all64_configure) : $( strip $( GOAL_TARGETS_CONFIGURE64) ) )
$( info Reconfigure targets ( make all32_configure) : $( strip $( GOAL_TARGETS_CONFIGURE32) ) )
$( info Other targets: $( OTHER_TARGETS) )
# All target
all : $( GOAL_TARGETS )
@echo " :: make $@ succeeded "
all32 : $( GOAL_TARGETS 32)
@echo " :: make $@ succeeded "
all64 : $( GOAL_TARGETS 64)
@echo " :: make $@ succeeded "
# Libraries (not wine) only -- wine has a length install step that runs unconditionally, so this is useful for updating
# incremental builds when not iterating on wine itself.
all_lib : $( GOAL_TARGETS_LIBS )
@echo " :: make $@ succeeded "
all32_lib : $( GOAL_TARGETS_LIBS 32)
@echo " :: make $@ succeeded "
all64_lib : $( GOAL_TARGETS_LIBS 64)
@echo " :: make $@ succeeded "
# Explicit reconfigure all targets
all_configure : $( GOAL_TARGETS_CONFIGURE )
@echo " :: make $@ succeeded "
all32_configure : $( GOAL_TARGETS_CONFIGURE 32)
@echo " :: make $@ succeeded "
all64_configure : $( GOAL_TARGETS_CONFIGURE 64)
@echo " :: make $@ succeeded "
e n d i f # End of NESTED_MAKE from beginning