Dima Zavin | f48b236 | 2011-08-30 10:46:09 -0700 | [diff] [blame] | 1 | # Copyright 2011 The Android Open Source Project |
| 2 | |
Brian Swetland | 303e6ac | 2011-09-20 17:38:06 -0700 | [diff] [blame] | 3 | ifneq ($(BUILD_TINY_ANDROID),true) |
| 4 | |
Dima Zavin | f48b236 | 2011-08-30 10:46:09 -0700 | [diff] [blame] | 5 | LOCAL_PATH := $(call my-dir) |
| 6 | include $(CLEAR_VARS) |
| 7 | |
| 8 | LOCAL_SRC_FILES := \ |
| 9 | charger.c |
| 10 | |
Dima Zavin | 209c7b0 | 2012-10-12 15:13:52 -0700 | [diff] [blame] | 11 | ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true) |
| 12 | LOCAL_CFLAGS := -DCHARGER_DISABLE_INIT_BLANK |
| 13 | endif |
| 14 | |
choongryeol.lee | 9255713 | 2012-11-15 17:03:03 -0800 | [diff] [blame] | 15 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 16 | LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND |
| 17 | endif |
| 18 | |
Dima Zavin | f48b236 | 2011-08-30 10:46:09 -0700 | [diff] [blame] | 19 | LOCAL_MODULE := charger |
| 20 | LOCAL_MODULE_TAGS := optional |
| 21 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 22 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 23 | LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED) |
| 24 | |
| 25 | LOCAL_C_INCLUDES := bootable/recovery |
| 26 | |
Doug Zongker | 0280f27 | 2014-03-11 08:42:09 -0700 | [diff] [blame] | 27 | LOCAL_STATIC_LIBRARIES := libminui libpng |
choongryeol.lee | 9255713 | 2012-11-15 17:03:03 -0800 | [diff] [blame] | 28 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 29 | LOCAL_STATIC_LIBRARIES += libsuspend |
| 30 | endif |
Ying Wang | 083b5cc | 2013-04-09 22:03:45 -0700 | [diff] [blame] | 31 | LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils liblog libm libc |
Dima Zavin | f48b236 | 2011-08-30 10:46:09 -0700 | [diff] [blame] | 32 | |
| 33 | include $(BUILD_EXECUTABLE) |
Brian Swetland | 303e6ac | 2011-09-20 17:38:06 -0700 | [diff] [blame] | 34 | |
Dima Zavin | 0052abd | 2011-09-22 15:49:04 -0700 | [diff] [blame] | 35 | define _add-charger-image |
| 36 | include $$(CLEAR_VARS) |
| 37 | LOCAL_MODULE := system_core_charger_$(notdir $(1)) |
| 38 | LOCAL_MODULE_STEM := $(notdir $(1)) |
| 39 | _img_modules += $$(LOCAL_MODULE) |
| 40 | LOCAL_SRC_FILES := $1 |
| 41 | LOCAL_MODULE_TAGS := optional |
| 42 | LOCAL_MODULE_CLASS := ETC |
| 43 | LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger |
| 44 | include $$(BUILD_PREBUILT) |
| 45 | endef |
| 46 | |
| 47 | _img_modules := |
| 48 | _images := |
| 49 | $(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \ |
| 50 | $(eval $(call _add-charger-image,$(_img)))) |
| 51 | |
| 52 | include $(CLEAR_VARS) |
| 53 | LOCAL_MODULE := charger_res_images |
| 54 | LOCAL_MODULE_TAGS := optional |
| 55 | LOCAL_REQUIRED_MODULES := $(_img_modules) |
| 56 | include $(BUILD_PHONY_PACKAGE) |
| 57 | |
| 58 | _add-charger-image := |
| 59 | _img_modules := |
Dima Zavin | dcecd4c | 2011-09-25 22:27:13 -0700 | [diff] [blame] | 60 | |
Brian Swetland | 303e6ac | 2011-09-20 17:38:06 -0700 | [diff] [blame] | 61 | endif |