Build apmanager from the new directory path

The apmanager ebuild recreates the old directory structure placing
apmanager as a subdirectory of platform2 in the build environment.
This structure doesn't match the current location of the code and
breaks incremental builds creating symlinks to apmanager in
platform2/ and even in the new apmanager directory.

This patch modifies the .gyp file to reference platform2 sources via
the platform2_root gyp variable and builds apmanager from the new
path. This fixes incremental builds.

For this change to take effect in Chrome OS, the ebuild file is updated
in a separated CL.

Bug: 23619937
TEST=emerge-$BOARD apmanager; cros_workon_make apmanager

Change-Id: I44d5afd2b47ff6508e98b583a25fd92126484d90
diff --git a/apmanager.gyp b/apmanager.gyp
index 55f86d3..0489656 100644
--- a/apmanager.gyp
+++ b/apmanager.gyp
@@ -29,6 +29,11 @@
     'cflags_cc': [
       '-Wno-missing-field-initializers', # for LAZY_INSTANCE_INITIALIZER
     ],
+    'include_dirs': [
+      # We need this include dir because we include all the local code as
+      # "apmanager/...".
+      '<(platform2_root)/../aosp/system/connectivity',
+    ],
   },
   'targets': [
     {
@@ -43,7 +48,7 @@
         'dbus_bindings/org.chromium.apmanager.Manager.xml',
         'dbus_bindings/org.chromium.apmanager.Service.xml',
       ],
-      'includes': ['../common-mk/generate-dbus-adaptors.gypi'],
+      'includes': ['../../../../platform2/common-mk/generate-dbus-adaptors.gypi'],
     },
     {
       'target_name': 'libapmanager',
@@ -116,7 +121,7 @@
             'dbus_bindings/org.chromium.apmanager.Manager.xml',
             'dbus_bindings/org.chromium.apmanager.Service.xml',
           ],
-          'includes': ['../common-mk/generate-dbus-proxies.gypi'],
+          'includes': ['../../../../platform2/common-mk/generate-dbus-proxies.gypi'],
         },
       ]
     },
@@ -128,7 +133,7 @@
           'target_name': 'apmanager_testrunner',
           'type': 'executable',
           'dependencies': ['libapmanager'],
-          'includes': ['../common-mk/common_test.gypi'],
+          'includes': ['../../../../platform2/common-mk/common_test.gypi'],
           'sources': [
             'config_unittest.cc',
             'device_info_unittest.cc',