Generate makefile for bench_pictures.
authorscroggo <scroggo@google.com>
Thu, 17 Jul 2014 13:58:28 +0000 (06:58 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 17 Jul 2014 13:58:29 +0000 (06:58 -0700)
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

gyp/tools.gyp
platform_tools/android/bin/gyp_to_android.py
platform_tools/android/gyp_gen/makefile_writer.py
platform_tools/android/tests/expectations/Android.mk

index e16fa4b..052130e 100644 (file)
         'tools.gyp:picture_renderer',
         'tools.gyp:picture_utils',
       ],
+      'conditions': [
+        ['skia_android_framework == 1', {
+          'libraries': [ '-lskia' ],
+        }],
+      ],
     },
     {
       'target_name': 'bench_record',
index 8083785..28c7d05 100755 (executable)
@@ -150,6 +150,15 @@ def main(target_dir=None, require_sk_user_config=False):
                                        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',
index e8f9773..436075c 100644 (file)
@@ -118,6 +118,7 @@ SKIA_TOOLS = (
 
 # 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 @@ class VarsDictData(object):
     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.
index 36c0e97..66712c0 100644 (file)
@@ -151,6 +151,7 @@ include $(BUILD_SHARED_LIBRARY)
 
 # 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