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