- Generate version header in the build tree
- Generate .res file in the build tree on Windows
- Add the $(SRC_PATH) prefix to the .def files on Windows
This is for building code in the "app" mode (for Windows
Store apps/RT/metro/modern UI/appcontainer), which restricts API
usage and uses the Windows Runtime APIs for threading instead of the
old Win32 functions that aren't available for such apps.
This is similar to building for Windows Phone, but without the phone
specific libraries.
The common parts are abstracted to a common include makefile, that
both the targets "msvc-app" and "msvc-wp" use.
This makes it clearer which ones actually are real platforms
(chosen automatically or explicitly via "make ARCH=foo") and which
ones just are shared helpers.
This allows building two versions for different architectures at
the same time, without the built files clobbering each other.
This is very helpful when trying to track down differences between
two build configurations.
To build outside of the source tree, create the other directory to
use for building (either outside of the openh264 directory, or as
a subdirectory), enter that directory, and do
"make -f path/to/openh264/Makefile".
This reduces the build time from 69 s to 30 s, reduces the size of
the built wels.lib from 30 MB to 3.9 MB, and reduces the number of
warnings when building wels.lib.
The architecture handling is now decoupled from the main
platform file. Now you can build for Windows Phone for x86 (for
the emulator) by "make OS=msvc-wp ARCH=x86".