blob: e654918d6b40580aa02284cac012333f5b24030b [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# /*****************************************************************************
2#* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
3#*
4#* ÎļþÃû³Æ: Makefile
5#* Îļþ±êʶ: Makefile
6#* ÄÚÈÝÕªÒª: Makefile of ZTE applications
7#* ʹÓ÷½·¨: void
8#*
9#* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
10#* -----------------------------------------------------------------------------
11#* 2017/02/16 V1.0 Create ax ´´½¨
12#*
13# ******************************************************************************/
14
15#*******************************************************************************
16# include ZTE application makefile
17#*******************************************************************************
18include $(zte_app_mak)
19
20WORKPATH = $(zte_lib_path)
21
22#*******************************************************************************
23# execute
24#*******************************************************************************
25EXEC = zte_dm
26SRCS = $(wildcard *.c ./unicom_dm/*.c ./mobile_dm/*.c ./telecom_dm/*.c)
27OBJS = $(patsubst %.c,%.o, $(SRCS))
28
29#*******************************************************************************
30# objects
31#*******************************************************************************
32#OBJS += DM_main.o DM_proc.o cJSON.o
33
34#*******************************************************************************
35# include path
36#*******************************************************************************
37INCLUE_PATH = -I. \
38 -I./../include \
39 -I./unicom_dm/include \
40 -I./mobile_dm/include \
41 -I./telecom_dm
42
43CFLAGS += -Wextra -Wall $(INCLUE_PATH)
44CFLAGS += -I$(zte_lib_path)/libnvram
45CFLAGS += -g
46#*******************************************************************************
47# macro definition
48#*******************************************************************************
49
50
51#*******************************************************************************
52# library
53#*******************************************************************************
54LDLIBS += -lpthread -lm -lrt -lnvram -ldl
55LDLIBS += -lssl -lcrypto
56
57LDLIBS += -lsoftap
58LDLIBS += -latutils
59LDLIBS += -lsoft_timer
60#*******************************************************************************
61# library path
62#*******************************************************************************
63LDLIBS += -L$(zte_lib_path)/libssl/install/lib
64CFLAGS += -I$(zte_lib_path)/libssl/install/include
65LDLIBS += -L$(zte_lib_path)/libnvram
66
67CFLAGS += -I$(zte_lib_path)/include
68LDLIBS += -L$(zte_lib_path)/libsoft_timer
69LDLIBS += -L$(zte_lib_path)/libsoftap
70LDLIBS += -L$(zte_lib_path)/libatutils
71#LDLIBS += -L$(zte_lib_path)/libssl/openssl-0.9.8g
72#*******************************************************************************
73# targets
74#*******************************************************************************
75all: $(EXEC)
76
77$(EXEC): $(OBJS)
78 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) -Wl,--end-group
79
80romfs:
81 cp $(EXEC) $(EXEC).elf
82 $(ROMFSINST) /bin/$(EXEC)
83 cp unicom_dm/pri.pem $(ROMFSDIR)/etc/
84 cp unicom_dm/pubkey.pem $(ROMFSDIR)/etc/
85 cp mobile_dm/file_key $(ROMFSDIR)/etc/
86
87
88clean:
89 -rm -f $(EXEC) $(OBJS) *.elf *.gdb *.o
90