Amin Shaikh | c4ee530 | 2019-03-14 16:04:11 +0000 | [diff] [blame] | 1 | # Copyright (C) 2018 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # We have to use BUILD_PREBUILT instead of PRODUCT_COPY_FIES, |
| 16 | # to copy over the NOTICE file. |
| 17 | |
| 18 | LOCAL_PATH := $(call my-dir) |
| 19 | |
| 20 | ifneq ($(SMALLER_FONT_FOOTPRINT),true) |
| 21 | |
Amin Shaikh | 6187e39 | 2019-03-25 14:10:54 -0400 | [diff] [blame] | 22 | # Build the rest of font files as prebuilt. |
| 23 | # $(1): The source file name in LOCAL_PATH. |
| 24 | # It also serves as the module name and the dest file name. |
| 25 | define build-one-font-module |
| 26 | $(eval include $(CLEAR_VARS))\ |
| 27 | $(eval LOCAL_MODULE := $(1))\ |
| 28 | $(eval LOCAL_SRC_FILES := $(1))\ |
| 29 | $(eval LOCAL_MODULE_CLASS := ETC)\ |
| 30 | $(eval LOCAL_MODULE_TAGS := optional)\ |
| 31 | $(eval LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/fonts)\ |
| 32 | $(eval LOCAL_PRODUCT_MODULE := true) \ |
| 33 | $(eval include $(BUILD_PREBUILT)) |
| 34 | endef |
Amin Shaikh | c4ee530 | 2019-03-14 16:04:11 +0000 | [diff] [blame] | 35 | |
Amin Shaikh | 6187e39 | 2019-03-25 14:10:54 -0400 | [diff] [blame] | 36 | font_src_files := \ |
| 37 | ZillaSlab-Medium.ttf \ |
| 38 | ZillaSlab-MediumItalic.ttf \ |
| 39 | ZillaSlab-SemiBold.ttf \ |
| 40 | ZillaSlab-SemiBoldItalic.ttf |
Amin Shaikh | c4ee530 | 2019-03-14 16:04:11 +0000 | [diff] [blame] | 41 | |
Amin Shaikh | 6187e39 | 2019-03-25 14:10:54 -0400 | [diff] [blame] | 42 | $(foreach f, $(font_src_files), $(call build-one-font-module, $(f))) |
Amin Shaikh | c4ee530 | 2019-03-14 16:04:11 +0000 | [diff] [blame] | 43 | |
Amin Shaikh | 6187e39 | 2019-03-25 14:10:54 -0400 | [diff] [blame] | 44 | build-one-font-module := |
| 45 | font_src_files := |
Amin Shaikh | c4ee530 | 2019-03-14 16:04:11 +0000 | [diff] [blame] | 46 | |
| 47 | endif |