shithub: openh264

Download patch

ref: b2f1cbaae975ec783a75843cd403d194a2d84bac
parent: b3342fa11a11d86e4f05d3e598ab727df1dd40d1
author: Martin Storsjö <[email protected]>
date: Tue May 5 06:33:46 EDT 2015

Add a separate platform makefile for "msvc-app"

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.

--- /dev/null
+++ b/build/msvc-app.mk
@@ -1,0 +1,15 @@
+include $(SRC_PATH)build/msvc-common.mk
+CFLAGS_OPT += -MD
+CFLAGS_DEBUG += -MDd
+CFLAGS += -DUNICODE
+# Ignore warnings about the main function prototype when building with -ZW
+CXXFLAGS += -ZW -wd4447
+# Ignore warnings about code built with -ZW in .lib files
+AR_OPTS += -ignore:4264
+
+# WelsThreadLib requires building with -ZW, since it uses new Windows Runtime
+# classes for creating threads.
+# If linking an .exe that contains Windows Runtime code, the first object
+# file linked into the exe also needs to be built with -ZW (otherwise the build
+# fails with "vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker",
+# so set it on all files.
--- /dev/null
+++ b/build/platform-msvc-app.mk
@@ -1,0 +1,3 @@
+include $(SRC_PATH)build/msvc-app.mk
+CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_APP
+
--- a/build/platform-msvc-wp.mk
+++ b/build/platform-msvc-wp.mk
@@ -1,18 +1,6 @@
 ARCH = arm
-include $(SRC_PATH)build/msvc-common.mk
-CFLAGS_OPT += -MD
-CFLAGS_DEBUG += -MDd
-CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DWINDOWS_PHONE -DUNICODE
-# Ignore warnings about the main function prototype when building with -ZW
-CXXFLAGS += -ZW -wd4447
+include $(SRC_PATH)build/msvc-app.mk
+CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DWINDOWS_PHONE
 LDFLAGS += -nodefaultlib:kernel32.lib -nodefaultlib:ole32.lib WindowsPhoneCore.lib
 UTSHLDFLAGS = -def:ut.def
-# Ignore warnings about code built with -ZW in .lib files
-AR_OPTS += -ignore:4264
 
-# WelsThreadLib requires building with -ZW, since it uses new Windows Runtime
-# classes for creating threads.
-# If linking an .exe that contains Windows Runtime code, the first object
-# file linked into the exe also needs to be built with -ZW (otherwise the build
-# fails with "vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker",
-# so set it on all files.