| #/****************************************************************************** |
| #*(C) Copyright 2008 Marvell International Ltd. |
| #* All Rights Reserved |
| #******************************************************************************/ |
| BUILDROOT := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) |
| |
| include $(BUILDROOT)/rules.make |
| |
| $(eval $(call define-local-build-dir, objs_aoc)) |
| |
| dtarget := $(LOCAL_BUILD_DIR)/aoc |
| |
| compile: $(dtarget) |
| |
| LOCAL_SRC_FILES := aoc.c onkey.c |
| |
| LOCAL_CFLAGS += -DMARVELL_EXTENDED |
| |
| CFLAGS += $(LOCAL_C_INCLUDES) |
| CFLAGS += $(LOCAL_CFLAGS) |
| CFLAGS += $(LOCAL_CPPFLAGS) |
| |
| LIBS := -lubus -lubox -lrilutil -lprop2uci -lpthread -lrt |
| |
| LOCAL_SRC_FILES += charger.c |
| LOCAL_SRC_FILES += alarmmanager.c |
| |
| $(eval $(call add-many-objects-rule, aoc_src, $(LOCAL_SRC_FILES),,)) |
| |
| prepare: |
| $(MRVL_HIDE)mkdir -p $(PXA_TARGET_OLIB) |
| |
| $(dtarget): prepare $(aoc_src_oo) |
| @echo " LD $@" |
| $(MRVL_HIDE)$(CC) $(CFLAGS) $(COPTS) -o $@ $(aoc_src_oo) $(LIBS) $(PXA_LD_FLAGS) |
| $(call copy_elf,$(dtarget),bin) |
| |
| install: |
| @echo "install done" |
| clean: |
| $(call clean_target, $(dtarget), bin) |
| $(MRVL_HIDE)rm -rf $(LOCAL_BUILD_DIR) |
| |
| ifeq "$(filter clean ,$(MAKECMDGOALS))" "" |
| -include $(aoc_src_dd) |
| endif |