Move the Android sample app into the android repo.
Review URL: http://codereview.appspot.com/5332054
git-svn-id: http://skia.googlecode.com/svn/trunk@2602 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/android_system.gyp b/gyp/android_system.gyp
index 85e70b8..27a82f3 100644
--- a/gyp/android_system.gyp
+++ b/gyp/android_system.gyp
@@ -2,151 +2,20 @@
# platform. The OS doesn't provide many stable libraries as part of the
# distribution so we have to build a few of them ourselves.
#
-# NOTE: We tried adding the gyp file to the android/ directory at the root of
+# We tried adding this gyp file to the android directory at the root of
# the Skia repo, but that resulted in the generated makefiles being created
-# outside of the out directory. We may be able to move the bulk of this gyp
-# to the /android directory and put a simple shim here, but that has yet to be
-# tested.
-
+# outside of the intended output directory. So to avoid this we created a simple
+# shim here that includes the android_system.gypi file. The actual dependencies
+# are defined and maintained in that gypi file.
+#
+# Also this assumes that the android directory is a sibling to the directory
+# that contains your primary Skia checkout. If it is not then you must manually
+# edit the includes below to specify the actual location of the android.gypi.
+# This is due to the fact that we cannot use variables in an includes as the
+# variable expansion step for gyp happens after the includes are processed.
{
- # Define the location of the required Android sources, allowing for override
- # in GYP_DEFINES.
- #
- # These sources are necessary because they must be built using the Android
- # toolchain and they are not expected to be present on the host OS.
- #
- 'variables': {
- 'android_repo%': '../../android',
- },
- 'android_repo%': '<(android_repo)',
-
'includes': [
'common.gypi',
+ '../../android/gyp/android.gypi',
],
-
- 'targets': [
- {
- 'target_name': 'ft2',
- 'type': 'static_library',
- 'sources': [
- '<(android_repo)/third_party/externals/freetype/src/base/ftbbox.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftbitmap.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftglyph.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftlcdfil.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftstroke.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftxf86.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftbase.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftsystem.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftinit.c',
- '<(android_repo)/third_party/externals/freetype/src/base/ftgasp.c',
-# '<(android_repo)/third_party/externals/freetype/src/base/ftfstype.c',
- '<(android_repo)/third_party/externals/freetype/src/raster/raster.c',
- '<(android_repo)/third_party/externals/freetype/src/sfnt/sfnt.c',
- '<(android_repo)/third_party/externals/freetype/src/smooth/smooth.c',
- '<(android_repo)/third_party/externals/freetype/src/autofit/autofit.c',
- '<(android_repo)/third_party/externals/freetype/src/truetype/truetype.c',
- '<(android_repo)/third_party/externals/freetype/src/cff/cff.c',
- '<(android_repo)/third_party/externals/freetype/src/psnames/psnames.c',
- '<(android_repo)/third_party/externals/freetype/src/pshinter/pshinter.c',
- ],
- 'include_dirs': [
- '<(android_repo)/third_party/externals/freetype/builds',
- '<(android_repo)/third_party/externals/freetype/include',
- ],
- 'cflags': [
- '-W',
- '-Wall',
- '-fPIC',
- '-DPIC',
- '-DDARWIN_NO_CARBON',
- '-DFT2_BUILD_LIBRARY',
- '-O2',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(android_repo)/third_party/externals/freetype/include', # For ft2build.h
- ],
- }
- },
- {
- 'target_name': 'expat',
- 'type': 'static_library',
- 'sources': [
- '<(android_repo)/third_party/externals/expat/lib/xmlparse.c',
- '<(android_repo)/third_party/externals/expat/lib/xmlrole.c',
- '<(android_repo)/third_party/externals/expat/lib/xmltok.c',
- ],
- 'include_dirs': [
- '<(android_repo)/third_party/externals/expat',
- '<(android_repo)/third_party/externals/expat/lib',
- ],
- 'cflags': [
- '-Wall',
- '-Wmissing-prototypes',
- '-Wstrict-prototypes',
- '-fexceptions',
- '-DHAVE_EXPAT_CONFIG_H',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(android_repo)/third_party/externals/expat/lib', # For expat.h
- ],
- }
- },
- {
- 'target_name': 'gif',
- 'type': 'static_library',
- 'sources': [
- '<(android_repo)/third_party/externals/gif/dgif_lib.c',
- '<(android_repo)/third_party/externals/gif/gifalloc.c',
- '<(android_repo)/third_party/externals/gif/gif_err.c',
- ],
- 'include_dirs': [
- '<(android_repo)/third_party/externals/gif',
- ],
- 'cflags': [
- '-Wno-format',
- '-DHAVE_CONFIG_H',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(android_repo)/third_party/externals/gif',
- ],
- }
- },
- {
- 'target_name': 'png',
- 'type': 'static_library',
- 'sources': [
- '<(android_repo)/third_party/externals/png/png.c',
- '<(android_repo)/third_party/externals/png/pngerror.c',
- '<(android_repo)/third_party/externals/png/pnggccrd.c',
- '<(android_repo)/third_party/externals/png/pngget.c',
- '<(android_repo)/third_party/externals/png/pngmem.c',
- '<(android_repo)/third_party/externals/png/pngpread.c',
- '<(android_repo)/third_party/externals/png/pngread.c',
- '<(android_repo)/third_party/externals/png/pngrio.c',
- '<(android_repo)/third_party/externals/png/pngrtran.c',
- '<(android_repo)/third_party/externals/png/pngrutil.c',
- '<(android_repo)/third_party/externals/png/pngset.c',
- '<(android_repo)/third_party/externals/png/pngtrans.c',
- '<(android_repo)/third_party/externals/png/pngvcrd.c',
- '<(android_repo)/third_party/externals/png/pngwio.c',
- '<(android_repo)/third_party/externals/png/pngwrite.c',
- '<(android_repo)/third_party/externals/png/pngwtran.c',
- '<(android_repo)/third_party/externals/png/pngwutil.c',
- ],
- 'include_dirs': [
- '<(android_repo)/third_party/externals/png',
- ],
- 'cflags': [
- '-fvisibility=hidden',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(android_repo)/third_party/externals/png',
- ],
- }
- },
- ]
}
\ No newline at end of file