Add GYP target for sk_tool_utils.* component.

This declares a static library target in gyp/sk_tool_utils.gyp, so other
targets can depend directly on it instead of including the source file
in their source lists.

BUG=None
TEST=make all
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/348623006
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index 9ced81b..2bbabf9 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -134,9 +134,6 @@
         # Lua
         '../src/utils/SkLuaCanvas.cpp',
         '../src/utils/SkLua.cpp',
-
-        # tools
-        '../tools/sk_tool_utils.cpp',
       ],
       'sources!': [
         '../samplecode/SampleSkLayer.cpp', #relies on SkMatrix44 which doesn't compile
@@ -152,6 +149,7 @@
         'pdf.gyp:pdf',
         'skia_lib.gyp:skia_lib',
         'tools.gyp:resources',
+        'tools.gyp:sk_tool_utils',
         'views.gyp:views',
         'views_animated.gyp:views_animated',
         'xml.gyp:xml',
diff --git a/gyp/bench.gyp b/gyp/bench.gyp
index 1c19437..9089bf8 100644
--- a/gyp/bench.gyp
+++ b/gyp/bench.gyp
@@ -15,6 +15,7 @@
         'skia_lib.gyp:skia_lib',
         'tools.gyp:crash_handler',
         'tools.gyp:resources',
+        'tools.gyp:sk_tool_utils',
         'tools.gyp:timer',
       ],
       'sources': [
@@ -24,7 +25,6 @@
         '../bench/GMBench.h',
         '../bench/ResultsWriter.cpp',
         '../bench/benchmain.cpp',
-        '../tools/sk_tool_utils.cpp',
       ],
       'conditions': [
         ['skia_gpu == 1',
diff --git a/gyp/tests.gypi b/gyp/tests.gypi
index f135107..9876f18 100644
--- a/gyp/tests.gypi
+++ b/gyp/tests.gypi
@@ -23,6 +23,7 @@
     'skia_lib.gyp:skia_lib',
     'tools.gyp:picture_utils',
     'tools.gyp:resources',
+    'tools.gyp:sk_tool_utils',
   ],
   'sources': [
     '../tests/Test.cpp',
@@ -197,7 +198,5 @@
 
     '../tests/TDStackNesterTest.cpp',
     '../experimental/PdfViewer/src/SkTDStackNester.h',
-
-    '../tools/sk_tool_utils.cpp',
   ],
 }
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index eeb210a..6913cc1 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -49,10 +49,10 @@
       'include_dirs' : [ '../src/utils/' ],
       'sources': [
         '../gm/gm_expectations.cpp',
-        '../tools/sk_tool_utils.cpp',
       ],
       'dependencies': [
         'jsoncpp.gyp:jsoncpp',
+        'sk_tool_utils',
         'skia_lib.gyp:skia_lib',
       ],
       'direct_dependent_settings': {
@@ -84,7 +84,18 @@
         'skia_lib.gyp:skia_lib',
       ],
       'direct_dependent_settings': {
-        'include_dirs': [ '../tools/', ],
+        'include_dirs': [ '../tools', ],
+      },
+    },
+    {
+      'target_name': 'sk_tool_utils',
+      'type': 'static_library',
+      'sources': [ '../tools/sk_tool_utils.cpp' ],
+      'dependencies': [
+        'skia_lib.gyp:skia_lib',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [ '../tools', ],
       },
     },
     {