xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 1 | # /***************************************************************************** |
| 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: |
| 19 | include $(COMMON_MK) |
| 20 | #******************************************************************************* |
| 21 | # execute |
| 22 | #******************************************************************************* |
| 23 | EXEC = sc_absvr |
| 24 | |
| 25 | #******************************************************************************* |
| 26 | # objects |
| 27 | #******************************************************************************* |
| 28 | SRCS=$(wildcard ./*.c) |
| 29 | OBJS = $(patsubst %.c,%.o,$(SRCS)) |
| 30 | |
| 31 | #******************************************************************************* |
| 32 | # include path |
| 33 | #******************************************************************************* |
| 34 | |
| 35 | |
| 36 | |
| 37 | CFLAGS += -Wall -g |
| 38 | |
| 39 | CFLAGS += -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 | |
| 46 | CFLAGS += -O2 |
| 47 | CFLAGS += -I../include |
| 48 | CFLAGS += -I./inc \ |
| 49 | -I$(zte_lib_path)/libssl/install/include \ |
| 50 | -I$(zte_lib_path)/libupi_ab/inc |
| 51 | #******************************************************************************* |
| 52 | # macro definition |
| 53 | #******************************************************************************* |
| 54 | |
| 55 | ifeq ($(PRJ_IS_MIN),yes) |
| 56 | |
| 57 | CFLAGS += -D_IS_MIN |
| 58 | |
| 59 | endif |
| 60 | |
| 61 | ifeq ($(CONFIG_USER_FOTA_OPEN_SOURCE),n) |
| 62 | CFLAGS += -D_USE_SYSTEM_COMMAND |
| 63 | endif |
| 64 | |
| 65 | |
| 66 | #******************************************************************************* |
| 67 | # library |
| 68 | #******************************************************************************* |
| 69 | LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer |
| 70 | |
| 71 | LDLIBS += -lpthread |
| 72 | LDLIBS += -lsoftap |
| 73 | LDLIBS += -lnvram_sc |
| 74 | |
| 75 | # SHA512 functions in libcrypto.a not libssl |
| 76 | #LDLIBS += -lssl |
| 77 | LDLIBS += -lcrypto |
| 78 | LDLIBS += -L$(zte_lib_path)/libssl/install/lib |
| 79 | LDLIBS += -L$(zte_lib_path)/libnvram |
| 80 | LDLIBS += -L$(zte_lib_path)/libsoftap |
| 81 | |
| 82 | LDLIBS += -lcpnv -L$(LIB_DIR)/libcpnv |
| 83 | |
| 84 | LDLIBS += -lupi_ab |
| 85 | LDLIBS += -L$(zte_lib_path)/libupi_ab |
| 86 | |
| 87 | CFLAGS += -I$(zte_lib_path)/libnvram |
| 88 | |
| 89 | #******************************************************************************* |
| 90 | # library path |
| 91 | #******************************************************************************* |
| 92 | |
| 93 | #******************************************************************************* |
| 94 | # targets |
| 95 | #******************************************************************************* |
| 96 | all: $(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 | |
| 105 | romfs root_fs: |
| 106 | $(ROMFSINST) /bin/$(EXEC) |
| 107 | |
| 108 | |
| 109 | clean: |
| 110 | -rm -f $(EXEC) *.elf *.gdb *.o ./src/*.o |