blob: e654918d6b40580aa02284cac012333f5b24030b [file] [log] [blame]
# /*****************************************************************************
#* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
#*
#* ÎļþÃû³Æ: Makefile
#* Îļþ±êʶ: Makefile
#* ÄÚÈÝÕªÒª: Makefile of ZTE applications
#* ʹÓ÷½·¨: void
#*
#* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
#* -----------------------------------------------------------------------------
#* 2017/02/16 V1.0 Create ax ´´½¨
#*
# ******************************************************************************/
#*******************************************************************************
# include ZTE application makefile
#*******************************************************************************
include $(zte_app_mak)
WORKPATH = $(zte_lib_path)
#*******************************************************************************
# execute
#*******************************************************************************
EXEC = zte_dm
SRCS = $(wildcard *.c ./unicom_dm/*.c ./mobile_dm/*.c ./telecom_dm/*.c)
OBJS = $(patsubst %.c,%.o, $(SRCS))
#*******************************************************************************
# objects
#*******************************************************************************
#OBJS += DM_main.o DM_proc.o cJSON.o
#*******************************************************************************
# include path
#*******************************************************************************
INCLUE_PATH = -I. \
-I./../include \
-I./unicom_dm/include \
-I./mobile_dm/include \
-I./telecom_dm
CFLAGS += -Wextra -Wall $(INCLUE_PATH)
CFLAGS += -I$(zte_lib_path)/libnvram
CFLAGS += -g
#*******************************************************************************
# macro definition
#*******************************************************************************
#*******************************************************************************
# library
#*******************************************************************************
LDLIBS += -lpthread -lm -lrt -lnvram -ldl
LDLIBS += -lssl -lcrypto
LDLIBS += -lsoftap
LDLIBS += -latutils
LDLIBS += -lsoft_timer
#*******************************************************************************
# library path
#*******************************************************************************
LDLIBS += -L$(zte_lib_path)/libssl/install/lib
CFLAGS += -I$(zte_lib_path)/libssl/install/include
LDLIBS += -L$(zte_lib_path)/libnvram
CFLAGS += -I$(zte_lib_path)/include
LDLIBS += -L$(zte_lib_path)/libsoft_timer
LDLIBS += -L$(zte_lib_path)/libsoftap
LDLIBS += -L$(zte_lib_path)/libatutils
#LDLIBS += -L$(zte_lib_path)/libssl/openssl-0.9.8g
#*******************************************************************************
# targets
#*******************************************************************************
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) -Wl,--end-group
romfs:
cp $(EXEC) $(EXEC).elf
$(ROMFSINST) /bin/$(EXEC)
cp unicom_dm/pri.pem $(ROMFSDIR)/etc/
cp unicom_dm/pubkey.pem $(ROMFSDIR)/etc/
cp mobile_dm/file_key $(ROMFSDIR)/etc/
clean:
-rm -f $(EXEC) $(OBJS) *.elf *.gdb *.o