1//# 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// 54cc_library_shared { 55 name: "libharfbuzz_ng", 56 arch: { 57 arm: { 58 instruction_set: "arm", 59 }, 60 }, 61 srcs: [ 62 "src/hb-blob.cc", 63 "src/hb-buffer-serialize.cc", 64 "src/hb-buffer.cc", 65 "src/hb-common.cc", 66 "src/hb-face.cc", 67 "src/hb-font.cc", 68 "src/hb-ot-tag.cc", 69 "src/hb-set.cc", 70 "src/hb-shape.cc", 71 "src/hb-shape-plan.cc", 72 "src/hb-shaper.cc", 73 "src/hb-unicode.cc", 74 "src/hb-warning.cc", 75 "src/hb-ot-font.cc", 76 "src/hb-ot-layout.cc", 77 "src/hb-ot-map.cc", 78 "src/hb-ot-math.cc", 79 "src/hb-ot-shape.cc", 80 "src/hb-ot-shape-complex-arabic.cc", 81 "src/hb-ot-shape-complex-default.cc", 82 "src/hb-ot-shape-complex-hangul.cc", 83 "src/hb-ot-shape-complex-hebrew.cc", 84 "src/hb-ot-shape-complex-indic.cc", 85 "src/hb-ot-shape-complex-indic-table.cc", 86 "src/hb-ot-shape-complex-myanmar.cc", 87 "src/hb-ot-shape-complex-thai.cc", 88 "src/hb-ot-shape-complex-tibetan.cc", 89 "src/hb-ot-shape-complex-use.cc", 90 "src/hb-ot-shape-complex-use-table.cc", 91 "src/hb-ot-shape-normalize.cc", 92 "src/hb-ot-shape-fallback.cc", 93 "src/hb-ot-var.cc", 94 95 "src/hb-icu.cc", 96 ], 97 98 shared_libs: [ 99 "libcutils", 100 "libicuuc", 101 "libicui18n", 102 "libutils", 103 "liblog", 104 ], 105 106 export_include_dirs: ["src"], 107 cflags: [ 108 "-DHAVE_INTEL_ATOMIC_PRIMITIVES", 109 "-DHAVE_OT", 110 "-DHAVE_ICU", 111 "-DHAVE_ICU_BUILTIN", 112 "-Werror", 113 "-Wno-unused-parameter", 114 "-Wno-missing-field-initializers", 115 ], 116} 117