blob: 6818f699a9468e0bd13c4610c8544000ae7a550f [file] [log] [blame]
djsollen@google.com58629292011-11-03 13:08:29 +00001# This GYP file stores the dependencies necessary to build Skia on the Android
2# platform. The OS doesn't provide many stable libraries as part of the
3# distribution so we have to build a few of them ourselves.
4#
5# NOTE: We tried adding the gyp file to the android/ directory at the root of
6# the Skia repo, but that resulted in the generated makefiles being created
7# outside of the out directory. We may be able to move the bulk of this gyp
8# to the /android directory and put a simple shim here, but that has yet to be
9# tested.
10
11{
12 # Define the location of the required Android sources, allowing for override
13 # in GYP_DEFINES.
14 #
15 # These sources are necessary because they must be built using the Android
16 # toolchain and they are not expected to be present on the host OS.
17 #
18 'variables': {
19 'android_repo%': '../../android_tools',
20 },
21 'android_repo%': '<(android_repo)',
22
23 'includes': [
24 'common.gypi',
25 ],
26
27 'targets': [
28 {
29 'target_name': 'ft2',
30 'type': 'static_library',
31 'sources': [
32 '<(android_repo)/external/freetype/src/base/ftbbox.c',
33 '<(android_repo)/external/freetype/src/base/ftbitmap.c',
34 '<(android_repo)/external/freetype/src/base/ftglyph.c',
35 '<(android_repo)/external/freetype/src/base/ftlcdfil.c',
36 '<(android_repo)/external/freetype/src/base/ftstroke.c',
37 '<(android_repo)/external/freetype/src/base/ftxf86.c',
38 '<(android_repo)/external/freetype/src/base/ftbase.c',
39 '<(android_repo)/external/freetype/src/base/ftsystem.c',
40 '<(android_repo)/external/freetype/src/base/ftinit.c',
41 '<(android_repo)/external/freetype/src/base/ftgasp.c',
42 '<(android_repo)/external/freetype/src/base/ftfstype.c',
43 '<(android_repo)/external/freetype/src/raster/raster.c',
44 '<(android_repo)/external/freetype/src/sfnt/sfnt.c',
45 '<(android_repo)/external/freetype/src/smooth/smooth.c',
46 '<(android_repo)/external/freetype/src/autofit/autofit.c',
47 '<(android_repo)/external/freetype/src/truetype/truetype.c',
48 '<(android_repo)/external/freetype/src/cff/cff.c',
49 '<(android_repo)/external/freetype/src/psnames/psnames.c',
50 '<(android_repo)/external/freetype/src/pshinter/pshinter.c',
51 ],
52 'include_dirs': [
53 '<(android_repo)/external/freetype/builds',
54 '<(android_repo)/external/freetype/include',
55 ],
56 'cflags': [
57 '-W',
58 '-Wall',
59 '-fPIC',
60 '-DPIC',
61 '-DDARWIN_NO_CARBON',
62 '-DFT2_BUILD_LIBRARY',
63 '-O2',
64 ],
65 'direct_dependent_settings': {
66 'include_dirs': [
67 '<(android_repo)/external/freetype/include', # For ft2build.h
68 ],
69 }
70 },
71 {
72 'target_name': 'expat',
73 'type': 'static_library',
74 'sources': [
75 '<(android_repo)/external/expat/lib/xmlparse.c',
76 '<(android_repo)/external/expat/lib/xmlrole.c',
77 '<(android_repo)/external/expat/lib/xmltok.c',
78 ],
79 'include_dirs': [
80 '<(android_repo)/external/expat',
81 '<(android_repo)/external/expat/lib',
82 ],
83 'cflags': [
84 '-Wall',
85 '-Wmissing-prototypes',
86 '-Wstrict-prototypes',
87 '-fexceptions',
88 '-DHAVE_EXPAT_CONFIG_H',
89 ],
90 'direct_dependent_settings': {
91 'include_dirs': [
92 '<(android_repo)/external/expat/lib', # For expat.h
93 ],
94 }
95 },
96 {
97 'target_name': 'gif',
98 'type': 'static_library',
99 'sources': [
100 '<(android_repo)/external/gif/dgif_lib.c',
101 '<(android_repo)/external/gif/gifalloc.c',
102 '<(android_repo)/external/gif/gif_err.c',
103 ],
104 'include_dirs': [
105 '<(android_repo)/external/gif',
106 ],
107 'cflags': [
108 '-Wno-format',
109 '-DHAVE_CONFIG_H',
110 ],
111 'direct_dependent_settings': {
112 'include_dirs': [
113 '<(android_repo)/external/gif',
114 ],
115 }
116 },
117 {
118 'target_name': 'png',
119 'type': 'static_library',
120 'sources': [
121 '<(android_repo)/external/png/png.c',
122 '<(android_repo)/external/png/pngerror.c',
123 '<(android_repo)/external/png/pnggccrd.c',
124 '<(android_repo)/external/png/pngget.c',
125 '<(android_repo)/external/png/pngmem.c',
126 '<(android_repo)/external/png/pngpread.c',
127 '<(android_repo)/external/png/pngread.c',
128 '<(android_repo)/external/png/pngrio.c',
129 '<(android_repo)/external/png/pngrtran.c',
130 '<(android_repo)/external/png/pngrutil.c',
131 '<(android_repo)/external/png/pngset.c',
132 '<(android_repo)/external/png/pngtrans.c',
133 '<(android_repo)/external/png/pngvcrd.c',
134 '<(android_repo)/external/png/pngwio.c',
135 '<(android_repo)/external/png/pngwrite.c',
136 '<(android_repo)/external/png/pngwtran.c',
137 '<(android_repo)/external/png/pngwutil.c',
138 ],
139 'include_dirs': [
140 '<(android_repo)/external/png',
141 ],
142 'cflags': [
143 '-fvisibility=hidden',
144 ],
145 'direct_dependent_settings': {
146 'include_dirs': [
147 '<(android_repo)/external/png',
148 ],
149 }
150 },
151 ]
152}