According to [this](https://github.com/FNA-XNA/FAudio/wiki/FAudio-for-Proton#part-1-building-faudio) FFMPEG is needed only for the WMA support in FAudio.
I will not build ``--with-ffmpeg`` in this example as it requires more changes.
I prefer to build them one-by-one arch-by-arch since ``make all`` is trying to build ``lsteamclient`` and ``vrclient`` targets before building ``wine`` whilst both targets having ``wine`` as a build dependency. You can see it in ``build/makefile_base.mak`` file.
My preferred make order:
```
make -j$(getconf _NPROCESSORS_ONLN) cmake32
make -j$(getconf _NPROCESSORS_ONLN) cmake64
make -j$(getconf _NPROCESSORS_ONLN) faudio32
make -j$(getconf _NPROCESSORS_ONLN) faudio64
make -j$(getconf _NPROCESSORS_ONLN) wine32
make -j$(getconf _NPROCESSORS_ONLN) wine64
make -j$(getconf _NPROCESSORS_ONLN) dxvk
make -j$(getconf _NPROCESSORS_ONLN) lsteamclient32
make -j$(getconf _NPROCESSORS_ONLN) lsteamclient64
make -j$(getconf _NPROCESSORS_ONLN) vrclient32
make -j$(getconf _NPROCESSORS_ONLN) vrclient64
make -j$(getconf _NPROCESSORS_ONLN) dist
make -j$(getconf _NPROCESSORS_ONLN) fonts
```
After this you will get the result under ``./dist`` directory.
> You can run ``make obj-wine32/Makefile`` and look in ``obj-wine32/config.log`` to see what is missing.
> ``DISABLED_SUBDIRS`` should be empty, otherwise you are going to miss some DLLs.
>
> If you updated the dev dependencies or ``wine/`` submodule repo and do not want wasting time recompiling the whole wine subrepo again, you can re-create Makefile ``rm obj-wine32/Makefile; make obj-wine32/Makefile``, so next time you run ``make wine32`` it will recompile only what is needed. The same applies to wine64.
## 5. Final steps
(Optional) You can archive your dist directory the same way Valve does:
ls -la dist/dist/lib{,64}/lib{avcodec,avutil,swresample}*
```
- check xaudio2 (FAudio)
```
ls -la dist/dist/lib{,64}/libFAudio.so
ls -la dist/dist/lib{,64}/wine/x3daudio1_{0..7}.dll.so
ls -la dist/dist/lib{,64}/wine/xactengine3_{0..7}.dll.so
ls -la dist/dist/lib{,64}/wine/xapofx1_{1..5}.dll.so
ls -la dist/dist/lib{,64}/wine/xaudio2_{0..9}.dll.so
```
> If ``xactengine3`` is missing then apply https://github.com/ValveSoftware/wine/commit/e0e3165c15, https://github.com/ValveSoftware/wine/commit/967f095438
- check DXVK
```
ls -la dist/dist/lib{,64}/wine/dxvk/*dll
```
- check lsteamclient
```
ls -la dist/dist/lib{,64}/wine/lsteamclient.dll.so
```
- check vrclient
```
ls -la dist/dist/{lib/wine/vrclient.dll.so,lib64/wine/vrclient_x64.dll.so}
ls -la dist/dist/{lib/wine/fakedlls/vrclient.dll,lib64/wine/fakedlls/vrclient_x64.dll}