blob: 9f29062ee16ccae723850709f367da267266891e [file] [log] [blame]
Colin Cross48e772f2016-12-02 15:03:22 -08001//#
2//# Copyright (C) 2012 The Android Open Source Project
3//#
4//# Licensed under the Apache License, Version 2.0 (the "License");
5//# you may not use this file except in compliance with the License.
6//# You may obtain a copy of the License at
7//#
8//# http://www.apache.org/licenses/LICENSE-2.0
9//#
10//# Unless required by applicable law or agreed to in writing, software
11//# distributed under the License is distributed on an "AS IS" BASIS,
12//# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//# See the License for the specific language governing permissions and
14//# limitations under the License.
15//#
16
17//############################################################
18// Note:
19//
20// This file is used to build HarfBuzz within the Android
21// platform itself. If you need to compile HarfBuzz to
22// ship with your Android NDK app, you can use the autotools
23// build system to do so. To do that you need to install a
24// "standalone" toolchain with the NDK, eg:
25//
26// ndk/build/tools/make-standalone-toolchain.sh
27// --platform=android-18
28// --install-dir=/prefix
29//
30// Set PLATFORM_PREFIX eng var to that prefix and make sure
31// the cross-compile tools from PLATFORM_PREFIX are in path.
32// Configure and install HarfBuzz:
33//
34// ./configure --host=arm-linux-androideabi
35// --prefix=$PLATFORM_PREFIX
36// --enable-static
37// --with-freetype
38// PKG_CONFIG_LIBDIR=$PLATFORM_PREFIX/lib/pkgconfig
39// make install
40//
41// You can first build FreeType the same way:
42//
43// ./configure --host=arm-linux-androideabi
44// --prefix=$PLATFORM_PREFIX
45// --enable-stati
46// --without-png
47// PKG_CONFIG_LIBDIR=$PLATFORM_PREFIX/lib/pkgconfig
48// make install
49//
50
51//############################################################
52// build the harfbuzz shared library
53//
Jerome Gaillard05990ca2019-06-27 19:28:10 +010054cc_library {
Colin Cross48e772f2016-12-02 15:03:22 -080055 name: "libharfbuzz_ng",
Jerome Gaillardd725ce12018-07-10 16:07:32 +010056 host_supported: true,
Colin Cross48e772f2016-12-02 15:03:22 -080057 arch: {
58 arm: {
59 instruction_set: "arm",
60 },
61 },
62 srcs: [
Seigo Nonaka6361ed02018-10-25 16:35:42 -070063 "src/hb-aat-layout.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -080064 "src/hb-aat-map.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080065 "src/hb-blob.cc",
66 "src/hb-buffer-serialize.cc",
67 "src/hb-buffer.cc",
68 "src/hb-common.cc",
69 "src/hb-face.cc",
Hal Canary07410162019-11-11 13:56:23 -050070 "src/hb-fallback-shape.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080071 "src/hb-font.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -080072 "src/hb-icu.cc",
Hal Canary07410162019-11-11 13:56:23 -050073 "src/hb-number.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -080074 "src/hb-ot-cff1-table.cc",
75 "src/hb-ot-cff2-table.cc",
Seigo Nonaka6361ed02018-10-25 16:35:42 -070076 "src/hb-ot-face.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080077 "src/hb-ot-font.cc",
78 "src/hb-ot-layout.cc",
79 "src/hb-ot-map.cc",
Jungshik Shinff95bda2017-01-26 12:39:49 -080080 "src/hb-ot-math.cc",
Hal Canary07410162019-11-11 13:56:23 -050081 "src/hb-ot-metrics.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080082 "src/hb-ot-shape-complex-arabic.cc",
83 "src/hb-ot-shape-complex-default.cc",
84 "src/hb-ot-shape-complex-hangul.cc",
85 "src/hb-ot-shape-complex-hebrew.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080086 "src/hb-ot-shape-complex-indic-table.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -080087 "src/hb-ot-shape-complex-indic.cc",
Siyamed Sinir476d1182018-07-27 17:31:17 -070088 "src/hb-ot-shape-complex-khmer.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080089 "src/hb-ot-shape-complex-myanmar.cc",
90 "src/hb-ot-shape-complex-thai.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080091 "src/hb-ot-shape-complex-use-table.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -080092 "src/hb-ot-shape-complex-use.cc",
93 "src/hb-ot-shape-complex-vowel-constraints.cc",
Colin Cross48e772f2016-12-02 15:03:22 -080094 "src/hb-ot-shape-fallback.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -080095 "src/hb-ot-shape-normalize.cc",
96 "src/hb-ot-shape.cc",
97 "src/hb-ot-tag.cc",
Jungshik Shinff95bda2017-01-26 12:39:49 -080098 "src/hb-ot-var.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -080099 "src/hb-set.cc",
100 "src/hb-shape-plan.cc",
101 "src/hb-shape.cc",
102 "src/hb-shaper.cc",
103 "src/hb-static.cc",
Hal Canary07410162019-11-11 13:56:23 -0500104 "src/hb-ucd.cc",
Seigo Nonakab878ff22018-12-21 15:32:33 -0800105 "src/hb-unicode.cc",
Colin Cross48e772f2016-12-02 15:03:22 -0800106 ],
107
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100108 target: {
109 android: {
110 shared_libs: [
Neil Fullerf59d42e2019-05-07 20:33:37 +0100111 "libandroidicu",
Jerome Gaillard8c46d582019-01-16 14:07:28 +0000112 "libcutils",
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100113 "libutils",
114 ],
115 },
116 host: {
Neil Fullerf59d42e2019-05-07 20:33:37 +0100117 shared_libs: [
118 "libicui18n",
119 "libicuuc",
120 ],
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100121 static_libs: [
Jerome Gaillard8c46d582019-01-16 14:07:28 +0000122 "libcutils",
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100123 "libutils",
124 ],
125 },
Jerome Gaillard8c46d582019-01-16 14:07:28 +0000126 windows: {
127 enabled: true,
128 },
Jerome Gaillardd725ce12018-07-10 16:07:32 +0100129 },
130
Colin Cross48e772f2016-12-02 15:03:22 -0800131 shared_libs: [
Colin Cross48e772f2016-12-02 15:03:22 -0800132 "liblog",
133 ],
134
135 export_include_dirs: ["src"],
136 cflags: [
Seigo Nonaka6294f2f2018-01-27 16:45:27 -0800137 "-DHAVE_INTEL_ATOMIC_PRIMITIVES",
Colin Cross48e772f2016-12-02 15:03:22 -0800138 "-DHAVE_OT",
139 "-DHAVE_ICU",
140 "-DHAVE_ICU_BUILTIN",
141 "-Werror",
142 "-Wno-unused-parameter",
143 "-Wno-missing-field-initializers",
144 ],
145}