1# Copyright 2011 The Android Open Source Project 2 3ifneq ($(BUILD_TINY_ANDROID),true) 4 5LOCAL_PATH := $(call my-dir) 6include $(CLEAR_VARS) 7 8LOCAL_SRC_FILES := \ 9 charger.c 10 11ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true) 12LOCAL_CFLAGS := -DCHARGER_DISABLE_INIT_BLANK 13endif 14 15ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) 16LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND 17endif 18 19LOCAL_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 27LOCAL_STATIC_LIBRARIES := libminui libpixelflinger_static libpng 28ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) 29LOCAL_STATIC_LIBRARIES += libsuspend 30endif 31LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils libm libc 32 33include $(BUILD_EXECUTABLE) 34 35define _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 := 60 61endif 62