lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | # /*****************************************************************************
|
| 2 | #* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
|
| 3 | #*
|
| 4 | #* ÎļþÃû³Æ: Makefile
|
| 5 | #* Îļþ±êʶ: Makefile
|
| 6 | #* ÄÚÈÝÕªÒª: Makefile of ZTE librarys
|
| 7 | #* ʹÓ÷½·¨: void
|
| 8 | #*
|
| 9 | #* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
|
| 10 | #* -----------------------------------------------------------------------------
|
| 11 | #* 2019/09/25 V1.0 Create xxq ´´½¨
|
| 12 | #*
|
| 13 | # ******************************************************************************/
|
| 14 |
|
| 15 | #*******************************************************************************
|
| 16 | # include ZTE library makefile
|
| 17 | #*******************************************************************************
|
| 18 | include $(COMMON_MK)
|
| 19 |
|
| 20 |
|
| 21 | #*******************************************************************************
|
| 22 | # library
|
| 23 | #*******************************************************************************
|
| 24 | LIB_SHARED = libvoice.so
|
| 25 | LIB_STATIC = libvoice.a
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 26 | ifeq ($(USE_VOICE_ALSA),yes)
|
| 27 | OBJS = voice.o alsa_call.o voice_api.o voiceipc.o
|
| 28 | else
|
| 29 | OBJS = voice.o
|
| 30 | endif
|
| 31 |
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 32 | CFLAGS += -g
|
| 33 | LDFLAGS += -lpthread
|
| 34 |
|
| 35 | ##############USER COMIZE END##################
|
| 36 |
|
| 37 | CFLAGS += -I$(zte_lib_path)/libtinyalsa/include
|
| 38 | CFLAGS += -I$(STAGEDIR)/include
|
| 39 | CFLAGS += -I$(APP_DIR)/include
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 40 | CFLAGS += -I$(LINUX_DIR)/include
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 41 | CFLAGS += -fPIC
|
| 42 |
|
| 43 | LDFLAGS_SHARED += -shared
|
| 44 |
|
| 45 |
|
| 46 | #*******************************************************************************
|
| 47 | # comp test app and
|
| 48 | #*******************************************************************************
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 49 | ifeq ($(USE_VOICE_ALSA),yes)
|
| 50 | EXEC_voiceipc = voiceipc
|
| 51 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 52 |
|
| 53 | #*******************************************************************************
|
| 54 | # objects
|
| 55 | #*******************************************************************************
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 56 | ifeq ($(USE_VOICE_ALSA),yes)
|
xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame^] | 57 | voiceipc_OBJECTS += alsa_call.o voice_api.o voiceipc.o
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 58 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 59 |
|
| 60 |
|
| 61 | #########################for linux######################################
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 | CFLAGS += -I./include/
|
| 68 | CFLAGS += -g -Werror=implicit-function-declaration
|
| 69 | SHAREDFLAG := -shared -lc
|
| 70 | LDLIBS += -L$(LIB_DIR)/libtinyalsa
|
| 71 | LDLIBS += -ltinyalsa
|
xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame^] | 72 | LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram
|
| 73 | LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
|
| 74 | LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 75 |
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 76 | ifeq ($(USE_VOICE_ALSA),yes)
|
| 77 | all: $(LIB_STATIC) $(LIB_SHARED) $(EXEC_voiceipc)
|
| 78 |
|
| 79 | $(LIB_STATIC) : $(OBJS)
|
| 80 | $(AR) rcs $(LIB_STATIC) $(OBJS)
|
| 81 |
|
| 82 | $(LIB_SHARED): $(OBJS)
|
| 83 | $(CC) $(LDFLAGS) $(LDFLAGS_SHARED) -o $@ $^
|
| 84 |
|
| 85 |
|
| 86 | $(EXEC_voiceipc): $(voiceipc_OBJECTS)
|
| 87 | $(CC) $(LDFLAGS) -o $@ $(voiceipc_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 88 |
|
| 89 | clean:
|
| 90 | rm -f $(voiceipc_OBJECTS) $(lib_OBJECTS) $(LIB_SHARED) $(LIB_STATIC) $(EXEC_voiceipc) *.elf *.gdb *.o core
|
| 91 |
|
| 92 | romfs:
|
| 93 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
|
| 94 | $(ROMFSINST) $(EXEC_voiceipc) /bin/$(EXEC_voiceipc)
|
| 95 |
|
| 96 | cp -v $(EXEC_voiceipc) $(APP_DIR)/test_tools/
|
| 97 | else
|
| 98 | all: $(LIB_STATIC) $(LIB_SHARED)
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 99 |
|
| 100 | $(LIB_STATIC) : $(OBJS)
|
| 101 | $(AR) rcs $(LIB_STATIC) $(OBJS)
|
| 102 |
|
| 103 | $(LIB_SHARED): $(OBJS)
|
| 104 | $(CC) $(LDFLAGS) $(LDFLAGS_SHARED) -o $@ $^
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 | clean:
|
| 110 | rm -f $(lib_OBJECTS) $(LIB_SHARED) $(LIB_STATIC) *.elf *.gdb *.o core
|
| 111 |
|
| 112 | romfs:
|
| 113 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 114 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 115 |
|
| 116 |
|