lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | # /*****************************************************************************
|
| 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 | #*******************************************************************************
|
| 18 | include $(zte_app_mak)
|
| 19 |
|
| 20 | WORKPATH = $(zte_lib_path)
|
| 21 |
|
| 22 | #*******************************************************************************
|
| 23 | # execute
|
| 24 | #*******************************************************************************
|
| 25 | EXEC = zte_dm
|
| 26 | SRCS = $(wildcard *.c ./unicom_dm/*.c ./mobile_dm/*.c ./telecom_dm/*.c)
|
| 27 | OBJS = $(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 | #*******************************************************************************
|
| 37 | INCLUE_PATH = -I. \
|
| 38 | -I./../include \
|
| 39 | -I./unicom_dm/include \
|
| 40 | -I./mobile_dm/include \
|
| 41 | -I./telecom_dm
|
| 42 |
|
| 43 | CFLAGS += -Wextra -Wall $(INCLUE_PATH)
|
| 44 | CFLAGS += -I$(zte_lib_path)/libnvram
|
| 45 | CFLAGS += -g
|
| 46 | #*******************************************************************************
|
| 47 | # macro definition
|
| 48 | #*******************************************************************************
|
| 49 |
|
| 50 |
|
| 51 | #*******************************************************************************
|
| 52 | # library
|
| 53 | #*******************************************************************************
|
| 54 | LDLIBS += -lpthread -lm -lrt -lnvram -ldl
|
| 55 | LDLIBS += -lssl -lcrypto
|
| 56 |
|
| 57 | LDLIBS += -lsoftap
|
| 58 | LDLIBS += -latutils
|
| 59 | LDLIBS += -lsoft_timer
|
| 60 | #*******************************************************************************
|
| 61 | # library path
|
| 62 | #*******************************************************************************
|
| 63 | LDLIBS += -L$(zte_lib_path)/libssl/install/lib
|
| 64 | CFLAGS += -I$(zte_lib_path)/libssl/install/include
|
| 65 | LDLIBS += -L$(zte_lib_path)/libnvram
|
| 66 |
|
| 67 | CFLAGS += -I$(zte_lib_path)/include
|
| 68 | LDLIBS += -L$(zte_lib_path)/libsoft_timer
|
| 69 | LDLIBS += -L$(zte_lib_path)/libsoftap
|
| 70 | LDLIBS += -L$(zte_lib_path)/libatutils
|
| 71 | #LDLIBS += -L$(zte_lib_path)/libssl/openssl-0.9.8g
|
| 72 | #*******************************************************************************
|
| 73 | # targets
|
| 74 | #*******************************************************************************
|
| 75 | all: $(EXEC)
|
| 76 |
|
| 77 | $(EXEC): $(OBJS)
|
| 78 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 79 |
|
| 80 | romfs:
|
| 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 |
|
| 88 | clean:
|
| 89 | -rm -f $(EXEC) $(OBJS) *.elf *.gdb *.o
|
| 90 |
|