Adding support to trunk for building Skia using the Android NDK.

This CL depends on a subsequent CL to add the appropriate NDK
toolchain and system sources to the skia repo.

Review URL: http://codereview.appspot.com/5306089/
Review URL: http://codereview.appspot.com/5306089

git-svn-id: http://skia.googlecode.com/svn/trunk@2592 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/opts.gyp b/gyp/opts.gyp
index e63b1cb..ae36481 100644
--- a/gyp/opts.gyp
+++ b/gyp/opts.gyp
@@ -35,11 +35,35 @@
             '-msse2',
           ],
         }],
-      ],
-      'sources': [
-        '../src/opts/SkBitmapProcState_opts_SSE2.cpp',
-        '../src/opts/SkBlitRow_opts_SSE2.cpp',
-        '../src/opts/SkUtils_opts_SSE2.cpp',
+        [ 'skia_target_arch != "arm"', {
+          'sources': [
+            '../src/opts/SkBitmapProcState_opts_SSE2.cpp',
+            '../src/opts/SkBlitRow_opts_SSE2.cpp',
+            '../src/opts/SkUtils_opts_SSE2.cpp',
+          ],
+        }],
+        [ 'skia_target_arch == "arm" and armv7 == 1', {
+          # The assembly uses the frame pointer register (r7 in Thumb/r11 in
+          # ARM), the compiler doesn't like that.
+          'cflags!': [
+            '-fno-omit-frame-pointer',
+          ],
+          'cflags': [
+            '-fomit-frame-pointer',
+          ],
+          'sources': [
+            '../src/opts/SkBitmapProcState_opts_arm.cpp',
+            '../src/opts/SkBlitRow_opts_arm.cpp',
+            '../src/opts/SkUtils_opts_none.cpp',
+          ],
+        }],
+        [ 'skia_target_arch == "arm" and armv7 != 1', {
+          'sources': [
+            '../src/opts/SkBitmapProcState_opts_none.cpp',
+            '../src/opts/SkBlitRow_opts_none.cpp',
+            '../src/opts/SkUtils_opts_none.cpp',
+          ],
+        }],
       ],
     },
   ],