blob: 8c3893b1ad62a4cc794d904aa3d486f6958e06b3 [file] [log] [blame]
xf.li742dd022023-06-08 01:43:32 -07001# /*****************************************************************************
2#* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
3#*
4#* ÎļþÃû³Æ: Makefile
5#* Îļþ±êʶ: Makefile
6#* ÄÚÈÝÕªÒª: Makefile of ZTE applications
7#* ʹÓ÷½·¨: void
8#*
9#* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
10#* -----------------------------------------------------------------------------
11#* 2022/07/13 V1.0 Create zln ´´½¨
12#*
13# ******************************************************************************/
14
15#*******************************************************************************
16# include ZTE application makefile
17#*******************************************************************************
18.EXPORT_ALL_VARIABLES:
19include $(COMMON_MK)
20#*******************************************************************************
21# execute
22#*******************************************************************************
23EXEC = sc_absvr
24
25#*******************************************************************************
26# objects
27#*******************************************************************************
28SRCS=$(wildcard ./*.c)
29OBJS = $(patsubst %.c,%.o,$(SRCS))
30
31#*******************************************************************************
32# include path
33#*******************************************************************************
34
35
36
37CFLAGS += -Wall -g
38
39CFLAGS += -Werror=implicit-int \
40 -Werror=implicit-function-declaration \
41 -Werror=float-equal \
42 -Werror=return-type \
43 -Werror=enum-compare \
44 -Werror=init-self
45
46CFLAGS += -O2
47CFLAGS += -I../include
48CFLAGS += -I./inc \
49 -I$(zte_lib_path)/libssl/install/include \
50 -I$(zte_lib_path)/libupi_ab/inc
51#*******************************************************************************
52# macro definition
53#*******************************************************************************
54
55ifeq ($(PRJ_IS_MIN),yes)
56
57CFLAGS += -D_IS_MIN
58
59endif
60
61ifeq ($(CONFIG_USER_FOTA_OPEN_SOURCE),n)
62CFLAGS += -D_USE_SYSTEM_COMMAND
63endif
64
65
66#*******************************************************************************
67# library
68#*******************************************************************************
69LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
70
71LDLIBS += -lpthread
72LDLIBS += -lsoftap
73LDLIBS += -lnvram_sc
74
75# SHA512 functions in libcrypto.a not libssl
76#LDLIBS += -lssl
77LDLIBS += -lcrypto
78LDLIBS += -L$(zte_lib_path)/libssl/install/lib
79LDLIBS += -L$(zte_lib_path)/libnvram
80LDLIBS += -L$(zte_lib_path)/libsoftap
81
82LDLIBS += -lcpnv -L$(LIB_DIR)/libcpnv
83
84LDLIBS += -lupi_ab
85LDLIBS += -L$(zte_lib_path)/libupi_ab
86
87CFLAGS += -I$(zte_lib_path)/libnvram
88
89#*******************************************************************************
90# library path
91#*******************************************************************************
92
93#*******************************************************************************
94# targets
95#*******************************************************************************
96all: $(EXEC)
97
98
99$(EXEC): $(OBJS)
100 $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
101 cp $(EXEC) $(EXEC).elf
102
103
104
105romfs root_fs:
106 $(ROMFSINST) /bin/$(EXEC)
107
108
109clean:
110 -rm -f $(EXEC) *.elf *.gdb *.o ./src/*.o