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-static \ 46 # --without-png \ 47 # PKG_CONFIG_LIBDIR=$PLATFORM_PREFIX/lib/pkgconfig 48 # make install 49 # 50 51 LOCAL_PATH:= $(call my-dir) 52 53 HARFBUZZ_SRC_FILES = \ 54 src/hb-blob.cc \ 55 src/hb-buffer-serialize.cc \ 56 src/hb-buffer.cc \ 57 src/hb-common.cc \ 58 src/hb-face.cc \ 59 src/hb-font.cc \ 60 src/hb-ot-tag.cc \ 61 src/hb-set.cc \ 62 src/hb-shape.cc \ 63 src/hb-shape-plan.cc \ 64 src/hb-shaper.cc \ 65 src/hb-unicode.cc \ 66 src/hb-warning.cc \ 67 src/hb-ot-font.cc \ 68 src/hb-ot-layout.cc \ 69 src/hb-ot-map.cc \ 70 src/hb-ot-shape.cc \ 71 src/hb-ot-shape-complex-arabic.cc \ 72 src/hb-ot-shape-complex-default.cc \ 73 src/hb-ot-shape-complex-hangul.cc \ 74 src/hb-ot-shape-complex-hebrew.cc \ 75 src/hb-ot-shape-complex-indic.cc \ 76 src/hb-ot-shape-complex-indic-table.cc \ 77 src/hb-ot-shape-complex-myanmar.cc \ 78 src/hb-ot-shape-complex-thai.cc \ 79 src/hb-ot-shape-complex-tibetan.cc \ 80 src/hb-ot-shape-complex-use.cc \ 81 src/hb-ot-shape-complex-use-table.cc \ 82 src/hb-ot-shape-normalize.cc \ 83 src/hb-ot-shape-fallback.cc \ 84 $(NULL) 85 86 ############################################################# 87 # build the harfbuzz shared library 88 # 89 include $(CLEAR_VARS) 90 LOCAL_ARM_MODE := arm 91 LOCAL_MODULE_TAGS := optional 92 LOCAL_SRC_FILES:= \ 93 $(HARFBUZZ_SRC_FILES) \ 94 src/hb-icu.cc 95 LOCAL_CPP_EXTENSION := .cc 96 LOCAL_SHARED_LIBRARIES := \ 97 libcutils \ 98 libicuuc \ 99 libicui18n \ 100 libutils \ 101 liblog 102 LOCAL_C_INCLUDES += \ 103 $(LOCAL_PATH)/src 104 LOCAL_CFLAGS += -DHB_NO_MT -DHAVE_OT -DHAVE_ICU -DHAVE_ICU_BUILTIN -Werror -Wno-unused-parameter \ 105 -Wno-missing-field-initializers 106 LOCAL_MODULE:= libharfbuzz_ng 107 include $(BUILD_SHARED_LIBRARY) 108