blob: 49abebce8e09e837dd574d2ea18ff19c05e8f1a1 [file] [log] [blame]
#*******************************************************************************
# include ZTE application makefile
#*******************************************************************************
include $(zte_app_mak)
##############USER COMIZE BEGIN################
EXEC = zte_amt
C_SOURCE = $(wildcard ./*.c)
OBJS = $(subst .c,.o,$(C_SOURCE))
CFLAGS += -I$(zte_app_path)/include
CFLAGS += -I$(zte_lib_path)/libnvram
CFLAGS += -I$(zte_lib_path)/libsqlite
CFLAGS += -I$(zte_lib_path)/libnetapi
CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/pal/dm
CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/zCore/gui
CFLAGS += -g
CFLAGS += -Wextra -Wall
#CFLAGS += -I../../../linux-3.4.x
CFLAGS += -I$(LINUX_DIR)/include
CFLAGS += -I/$(TOPDIR)/pub/project/$(CHIP_NAME)/include/nv
CFLAGS += -I$(zte_lib_path)/libamt
ifeq ($(USE_VOICE_SUPPORT),yes)
CFLAGS += -I$(zte_lib_path)/libtinyalsa/include
endif
LDLIBS = -lpthread -lm
LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram
LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
LDLIBS += -lcpnv -L$(zte_lib_path)/libcpnv
ifeq ($(USE_NVRO_BACKUP),yes)
LDLIBS += -lcrypto -L$(zte_lib_path)/libssl/install/lib
LDLIBS += -lflags -L$(zte_lib_path)/libflags
endif
LDLIBS += -lamt -L$(zte_lib_path)/libamt
ifeq ($(USE_VOICE_SUPPORT),yes)
LDLIBS += -ltinyalsa -L$(zte_lib_path)/libtinyalsa
endif
ifeq ($(USE_VOICE_SUPPORT),yes)
CFLAGS += -D_USE_VOICE_SUPPORT
endif
#wifi
ifeq ($(CONFIG_WIFI_MODULE),ssv6x5x)
CFLAGS += -D__SSV_6X5X_CHIP__
else ifeq ($(CONFIG_WIFI_MODULE),aic8800)
CFLAGS += -D__AIC_8800DW_CHIP__
endif
##############USER COMIZE END##################
#*******************************************************************************
# targets
#*******************************************************************************
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) -Wl,--end-group
@cp $@ $@.elf
romfs:
$(ROMFSINST) $(EXEC) /bin/$(EXEC)
clean:
-rm -f $(EXEC) *.elf *.gdb *.o