blob: fe0c91d93dc877fe6cef662da84601cf539c888d [file] [log] [blame]
Dima Zavinf48b2362011-08-30 10:46:09 -07001# Copyright 2011 The Android Open Source Project
2
Brian Swetland303e6ac2011-09-20 17:38:06 -07003ifneq ($(BUILD_TINY_ANDROID),true)
4
Dima Zavinf48b2362011-08-30 10:46:09 -07005LOCAL_PATH := $(call my-dir)
6include $(CLEAR_VARS)
7
8LOCAL_SRC_FILES := \
9 charger.c
10
Dima Zavin209c7b02012-10-12 15:13:52 -070011ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true)
12LOCAL_CFLAGS := -DCHARGER_DISABLE_INIT_BLANK
13endif
14
Dima Zavinf48b2362011-08-30 10:46:09 -070015LOCAL_MODULE := charger
16LOCAL_MODULE_TAGS := optional
17LOCAL_FORCE_STATIC_EXECUTABLE := true
18LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
19LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
20
21LOCAL_C_INCLUDES := bootable/recovery
22
23LOCAL_STATIC_LIBRARIES := libminui libpixelflinger_static libpng
Stephen Hinesc60e6e72012-08-23 15:17:09 -070024LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils libm libc
Dima Zavinf48b2362011-08-30 10:46:09 -070025
26include $(BUILD_EXECUTABLE)
Brian Swetland303e6ac2011-09-20 17:38:06 -070027
Dima Zavin0052abd2011-09-22 15:49:04 -070028define _add-charger-image
29include $$(CLEAR_VARS)
30LOCAL_MODULE := system_core_charger_$(notdir $(1))
31LOCAL_MODULE_STEM := $(notdir $(1))
32_img_modules += $$(LOCAL_MODULE)
33LOCAL_SRC_FILES := $1
34LOCAL_MODULE_TAGS := optional
35LOCAL_MODULE_CLASS := ETC
36LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger
37include $$(BUILD_PREBUILT)
38endef
39
40_img_modules :=
41_images :=
42$(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \
43 $(eval $(call _add-charger-image,$(_img))))
44
45include $(CLEAR_VARS)
46LOCAL_MODULE := charger_res_images
47LOCAL_MODULE_TAGS := optional
48LOCAL_REQUIRED_MODULES := $(_img_modules)
49include $(BUILD_PHONY_PACKAGE)
50
51_add-charger-image :=
52_img_modules :=
Dima Zavindcecd4c2011-09-25 22:27:13 -070053
Brian Swetland303e6ac2011-09-20 17:38:06 -070054endif