blob: ad6b6c7101a84cd956dd0abd946f8ddb09802a61 [file] [log] [blame]
#*******************************************************************************
# include ZTE application makefile
#*******************************************************************************
include $(COMMON_MK)
##############USER COMIZE BEGIN################
EXEC = fs_check
OBJS = fs_check.o mtd.o
CFLAGS += -I$(zte_app_path)/include
CFLAGS += -I$(zte_lib_path)/libnvram
#CFLAGS += -I$(zte_lib_path)/libsqlite
#CFLAGS += -I$(zte_lib_path)/libsoftap
CFLAGS += -g -Werror=implicit-function-declaration
ifeq ($(CONFIG_SYSTEM_CAP),y)
CFLAGS += -DCONFIG_SYSTEM_CAP
endif
ifneq ($(ERASEBLOCK),)
CFLAGS += -DCONFIG_BLOCK_SIZE=$(ERASEBLOCK)
else
$(error [error ERASEBLOCK not define])
endif
#LDLIBS = -lpthread -lm
LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram
ifeq ($(USE_ZXIC_DEBUG_INFO),yes)
LDLIBS += -ldebug_info -L$(zte_lib_path)/libdebug_info
endif
#LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
#LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
##############USER COMIZE END##################
#*******************************************************************************
# targets
#*******************************************************************************
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
@cp $@ $@.elf
ifneq ($(USE_RECOVERYFS),yes)
ifeq ($(USE_FOTA),yes)
ifneq ($(USE_FOTA_AB),yes)
$(CC) $(LD_BEGIN) -static $(LDFLAGS) -o $@_recovery $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group $(LD_END)
cp $(EXEC)_recovery $(EXEC)_recovery.elf
endif
endif
endif
romfs:
$(ROMFSINST) $(EXEC) /bin/$(EXEC)
ifneq ($(USE_RECOVERYFS),yes)
ifeq ($(USE_FOTA),yes)
ifneq ($(USE_FOTA_AB),yes)
$(ROMFSINST) $(EXEC)_recovery /recovery/bin/$(EXEC)_recovery
endif
endif
endif
clean:
-rm -f $(EXEC) $(EXEC)_recovery *.elf *.gdb *.o