Generate makefile for bench_pictures.

When generating Android framework makefiles, create one for
bench_pictures.

BUG=skia:2744
R=djsollen@google.com, halcanary@google.com, mtklein@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/391423002
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index e16fa4b..052130e 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -400,6 +400,11 @@
         'tools.gyp:picture_renderer',
         'tools.gyp:picture_utils',
       ],
+      'conditions': [
+        ['skia_android_framework == 1', {
+          'libraries': [ '-lskia' ],
+        }],
+      ],
     },
     {
       'target_name': 'bench_record',
diff --git a/platform_tools/android/bin/gyp_to_android.py b/platform_tools/android/bin/gyp_to_android.py
index 8083785..28c7d05 100755
--- a/platform_tools/android/bin/gyp_to_android.py
+++ b/platform_tools/android/bin/gyp_to_android.py
@@ -150,6 +150,15 @@
                                        desired_targets=['bench'])
 
     tool_makefile_writer.generate_tool(gyp_dir=tmp_folder,
+                                       target_file='tools.gyp',
+                                       skia_trunk=target_dir,
+                                       dest_dir='tools',
+                                       skia_lib_var_dict=common,
+                                       local_module_name='skia_bench_pictures',
+                                       local_module_tags=['tests'],
+                                       desired_targets=['bench_pictures'])
+
+    tool_makefile_writer.generate_tool(gyp_dir=tmp_folder,
                                        target_file='gm.gyp',
                                        skia_trunk=target_dir,
                                        dest_dir='gm',
diff --git a/platform_tools/android/gyp_gen/makefile_writer.py b/platform_tools/android/gyp_gen/makefile_writer.py
index e8f9773..436075c 100644
--- a/platform_tools/android/gyp_gen/makefile_writer.py
+++ b/platform_tools/android/gyp_gen/makefile_writer.py
@@ -118,6 +118,7 @@
 
 # benchmark (timings)
 include $(BASE_PATH)/bench/Android.mk
+include $(BASE_PATH)/tools/Android.mk
 
 # golden-master (fidelity / regression test)
 include $(BASE_PATH)/gm/Android.mk
@@ -149,28 +150,28 @@
     self.name = name
 
 def write_local_path(f):
-    """Add the LOCAL_PATH line to the makefile.
+  """Add the LOCAL_PATH line to the makefile.
 
-    Args:
-      f: File open for writing.
-    """
-    f.write('LOCAL_PATH:= $(call my-dir)\n')
+  Args:
+    f: File open for writing.
+  """
+  f.write('LOCAL_PATH:= $(call my-dir)\n')
 
 def write_clear_vars(f):
-    """Add the CLEAR_VARS line to the makefile.
+  """Add the CLEAR_VARS line to the makefile.
 
-    Args:
-      f: File open for writing.
-    """
-    f.write('include $(CLEAR_VARS)\n')
+  Args:
+    f: File open for writing.
+  """
+  f.write('include $(CLEAR_VARS)\n')
 
 def write_include_stlport(f):
-    """Add a line to include stlport.
+  """Add a line to include stlport.
 
-    Args:
-      f: File open for writing.
-    """
-    f.write('include external/stlport/libstlport.mk\n')
+  Args:
+    f: File open for writing.
+  """
+  f.write('include external/stlport/libstlport.mk\n')
 
 def write_android_mk(target_dir, common, deviations_from_common):
   """Given all the variables, write the final make file.
diff --git a/platform_tools/android/tests/expectations/Android.mk b/platform_tools/android/tests/expectations/Android.mk
index 36c0e97..66712c0 100644
--- a/platform_tools/android/tests/expectations/Android.mk
+++ b/platform_tools/android/tests/expectations/Android.mk
@@ -151,6 +151,7 @@
 
 # benchmark (timings)
 include $(BASE_PATH)/bench/Android.mk
+include $(BASE_PATH)/tools/Android.mk
 
 # golden-master (fidelity / regression test)
 include $(BASE_PATH)/gm/Android.mk