From 064d2768a80c66f318a1eff89aa9d12907d407a4 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Tue, 3 Dec 2013 19:13:53 +0000 Subject: [PATCH] Windows Arm makefile and build fix. BUG=290 TESTED=make -f winarm.mk R=kjellander@google.com, mflodman@webrtc.org, tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/4839004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@890 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/cpu_id.cc | 3 ++- winarm.mk | 43 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 winarm.mk diff --git a/README.chromium b/README.chromium index b91e60417..93d07fbb5 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 888 +Version: 890 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 07ea93eb4..033dbf667 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 888 +#define LIBYUV_VERSION 890 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 61c2fa573..c4f840abb 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -160,7 +160,8 @@ int cpu_info_ = kCpuInit; // cpu_info is not initialized yet. // Test environment variable for disabling CPU features. Any non-zero value // to disable. Zero ignored to make it easy to set the variable on/off. -#if !defined(__native_client__) +#if !defined(__native_client__) && !defined(_M_ARM) + static bool TestEnv(const char* name) { const char* var = getenv(name); if (var) { diff --git a/winarm.mk b/winarm.mk new file mode 100644 index 000000000..2638608eb --- /dev/null +++ b/winarm.mk @@ -0,0 +1,43 @@ +# This is a generic makefile for libyuv for Windows Arm. +# nmake /f winarm.mk +# make -f winarm.mk +# nmake /f winarm.mk clean +# consider /arch:ARMv7VE +CC=cl +CCFLAGS=/Ox /nologo /Iinclude /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP +AR=lib +ARFLAGS=/MACHINE:ARM /NOLOGO /SUBSYSTEM:NATIVE +RM=cmd /c del + +LOCAL_OBJ_FILES = \ + source/compare.o\ + source/compare_common.o\ + source/convert.o\ + source/convert_argb.o\ + source/convert_from.o\ + source/convert_from_argb.o\ + source/convert_to_argb.o\ + source/convert_to_i420.o\ + source/cpu_id.o\ + source/format_conversion.o\ + source/planar_functions.o\ + source/rotate.o\ + source/rotate_argb.o\ + source/row_any.o\ + source/row_common.o\ + source/scale.o\ + source/scale_argb.o\ + source/scale_common.o\ + source/video_common.o + +.cc.o: + $(CC) /c $(CCFLAGS) $*.cc /Fo$@ + +all: libyuv_arm.lib winarm.mk + +libyuv_arm.lib: $(LOCAL_OBJ_FILES) winarm.mk + $(AR) $(ARFLAGS) /OUT:$@ $(LOCAL_OBJ_FILES) + +clean: + $(RM) "source\*.o" libyuv_arm.lib +