blob: f7ba13ba09313be5715b59c4ea88008605061ea7 [file] [log] [blame]
Dan Pasanen24a1cc92016-12-28 22:59:21 -06001#
2# Copyright (C) 2016 The CyanogenMod 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
17define build-bootanimation
18 sh vendor/cm/bootanimation/generate-bootanimation.sh \
19 $(TARGET_SCREEN_WIDTH) \
20 $(TARGET_SCREEN_HEIGHT) \
21 $(TARGET_BOOTANIMATION_HALF_RES)
22endef
23
24TARGET_GENERATED_BOOTANIMATION := $(TARGET_OUT_INTERMEDIATES)/BOOTANIMATION/bootanimation.zip
25$(TARGET_GENERATED_BOOTANIMATION):
26 @echo "Building bootanimation"
27 $(build-bootanimation)
28
29ifeq ($(TARGET_BOOTANIMATION),)
30 TARGET_BOOTANIMATION := $(TARGET_GENERATED_BOOTANIMATION)
31 ifeq ($(shell command -v convert),)
32 $(info **********************************************)
33 $(info The boot animation could not be generated as)
34 $(info ImageMagick is not installed in your system.)
35 $(info $(space))
36 $(info Please install ImageMagick from this website:)
37 $(info https://imagemagick.org/script/binary-releases.php)
38 $(info **********************************************)
39 $(error stop)
40 endif
41endif
42
43include $(CLEAR_VARS)
44LOCAL_MODULE := bootanimation.zip
45LOCAL_MODULE_CLASS := ETC
46LOCAL_MODULE_PATH := $(TARGET_OUT)/media
47
48include $(BUILD_SYSTEM)/base_rules.mk
49
50$(LOCAL_BUILT_MODULE): $(TARGET_BOOTANIMATION)
51 @mkdir -p $(dir $@)
52 @cp $(TARGET_BOOTANIMATION) $@