blob: 40c7d78dd401ab60826d3ba68832a8a0b8e3c42b [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
choongryeol.lee92557132012-11-15 17:03:03 -080015ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
16LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND
17endif
18
Dima Zavinf48b2362011-08-30 10:46:09 -070019LOCAL_MODULE := charger
20LOCAL_MODULE_TAGS := optional
21LOCAL_FORCE_STATIC_EXECUTABLE := true
22LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
23LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
24
25LOCAL_C_INCLUDES := bootable/recovery
26
Doug Zongker0280f272014-03-11 08:42:09 -070027LOCAL_STATIC_LIBRARIES := libminui libpng
choongryeol.lee92557132012-11-15 17:03:03 -080028ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
29LOCAL_STATIC_LIBRARIES += libsuspend
30endif
Ying Wang083b5cc2013-04-09 22:03:45 -070031LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils liblog libm libc
Dima Zavinf48b2362011-08-30 10:46:09 -070032
33include $(BUILD_EXECUTABLE)
Brian Swetland303e6ac2011-09-20 17:38:06 -070034
Dima Zavin0052abd2011-09-22 15:49:04 -070035define _add-charger-image
36include $$(CLEAR_VARS)
37LOCAL_MODULE := system_core_charger_$(notdir $(1))
38LOCAL_MODULE_STEM := $(notdir $(1))
39_img_modules += $$(LOCAL_MODULE)
40LOCAL_SRC_FILES := $1
41LOCAL_MODULE_TAGS := optional
42LOCAL_MODULE_CLASS := ETC
43LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger
44include $$(BUILD_PREBUILT)
45endef
46
47_img_modules :=
48_images :=
49$(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \
50 $(eval $(call _add-charger-image,$(_img))))
51
52include $(CLEAR_VARS)
53LOCAL_MODULE := charger_res_images
54LOCAL_MODULE_TAGS := optional
55LOCAL_REQUIRED_MODULES := $(_img_modules)
56include $(BUILD_PHONY_PACKAGE)
57
58_add-charger-image :=
59_img_modules :=
Dima Zavindcecd4c2011-09-25 22:27:13 -070060
Brian Swetland303e6ac2011-09-20 17:38:06 -070061endif