When building for Android, package executables in APKs (trunk)
Review URL: https://codereview.appspot.com/6307101

git-svn-id: http://skia.googlecode.com/svn/trunk@4368 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/Makefile b/Makefile
index f206ccf..7ad2106 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,10 @@
 CWD := $(shell pwd)
 ALL_TARGETS := core SampleApp bench gm tests tools
 
+ifneq (,$(findstring skia_os=android, $(GYP_DEFINES)))
+  ALL_TARGETS += SkiaAndroidApp
+endif
+
 # Default target.  This must be listed before all other targets.
 .PHONY: default
 default: all
diff --git a/gyp/apptype_console.gypi b/gyp/apptype_console.gypi
index f2f6e1c..6971b6a 100644
--- a/gyp/apptype_console.gypi
+++ b/gyp/apptype_console.gypi
@@ -11,6 +11,13 @@
         'EntryPointSymbol': 'mainCRTStartup',
       },
     },
+    'conditions': [
+      [ 'skia_os == "android"', {
+        'dependencies': [
+          'android_system.gyp:Android_EntryPoint',
+        ],
+      }],
+    ],
   },
 }
 
diff --git a/gyp/bench.gyp b/gyp/bench.gyp
index dcf9b5f..b0fe517 100644
--- a/gyp/bench.gyp
+++ b/gyp/bench.gyp
@@ -75,6 +75,11 @@
             '../bench/BenchSysTimer_windows.cpp',
           ],
         }],
+        [ 'skia_os == "android"', {
+          'dependencies!': [
+            'android_system.gyp:Android_EntryPoint',
+          ],
+        }],
       ],
     }
   ],
diff --git a/skia.gyp b/skia.gyp
index 164ef09..028df4c 100644
--- a/skia.gyp
+++ b/skia.gyp
@@ -21,6 +21,13 @@
         'gyp/tests.gyp:tests',
         'gyp/tools.gyp:tools',
       ],
+      'conditions': [
+        ['skia_os == "android"', {
+          'dependencies': [
+            'gyp/android_system.gyp:SkiaAndroidApp',
+          ],
+        }],
+      ],
     },
   ],
 }