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
|
xf.li | e31de8b | 2023-12-26 23:38:58 -0800 | [diff] [blame] | 28 | else ifeq ($(USE_VOICE_BUFFER_IN_AP),yes)
|
| 29 | OBJS = voice.o voice_buffer.o
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 30 | else
|
| 31 | OBJS = voice.o
|
| 32 | endif
|
| 33 |
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 34 | CFLAGS += -g
|
| 35 | LDFLAGS += -lpthread
|
| 36 |
|
| 37 | ##############USER COMIZE END##################
|
| 38 |
|
| 39 | CFLAGS += -I$(zte_lib_path)/libtinyalsa/include
|
| 40 | CFLAGS += -I$(STAGEDIR)/include
|
| 41 | CFLAGS += -I$(APP_DIR)/include
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 42 | CFLAGS += -I$(LINUX_DIR)/include
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 43 | CFLAGS += -fPIC
|
| 44 |
|
| 45 | LDFLAGS_SHARED += -shared
|
| 46 |
|
| 47 |
|
| 48 | #*******************************************************************************
|
| 49 | # comp test app and
|
| 50 | #*******************************************************************************
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 51 | ifeq ($(USE_VOICE_ALSA),yes)
|
| 52 | EXEC_voiceipc = voiceipc
|
| 53 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 54 |
|
| 55 | #*******************************************************************************
|
| 56 | # objects
|
| 57 | #*******************************************************************************
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 58 | ifeq ($(USE_VOICE_ALSA),yes)
|
xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 59 | voiceipc_OBJECTS += alsa_call.o voice_api.o voiceipc.o
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 60 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 61 |
|
| 62 |
|
| 63 | #########################for linux######################################
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 | CFLAGS += -I./include/
|
| 70 | CFLAGS += -g -Werror=implicit-function-declaration
|
| 71 | SHAREDFLAG := -shared -lc
|
| 72 | LDLIBS += -L$(LIB_DIR)/libtinyalsa
|
| 73 | LDLIBS += -ltinyalsa
|
xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 74 | LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram
|
| 75 | LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
|
| 76 | LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 77 |
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 78 | ifeq ($(USE_VOICE_ALSA),yes)
|
| 79 | all: $(LIB_STATIC) $(LIB_SHARED) $(EXEC_voiceipc)
|
| 80 |
|
| 81 | $(LIB_STATIC) : $(OBJS)
|
| 82 | $(AR) rcs $(LIB_STATIC) $(OBJS)
|
| 83 |
|
| 84 | $(LIB_SHARED): $(OBJS)
|
| 85 | $(CC) $(LDFLAGS) $(LDFLAGS_SHARED) -o $@ $^
|
| 86 |
|
| 87 |
|
| 88 | $(EXEC_voiceipc): $(voiceipc_OBJECTS)
|
| 89 | $(CC) $(LDFLAGS) -o $@ $(voiceipc_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 90 |
|
| 91 | clean:
|
| 92 | rm -f $(voiceipc_OBJECTS) $(lib_OBJECTS) $(LIB_SHARED) $(LIB_STATIC) $(EXEC_voiceipc) *.elf *.gdb *.o core
|
| 93 |
|
| 94 | romfs:
|
| 95 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
|
| 96 | $(ROMFSINST) $(EXEC_voiceipc) /bin/$(EXEC_voiceipc)
|
| 97 |
|
| 98 | cp -v $(EXEC_voiceipc) $(APP_DIR)/test_tools/
|
| 99 | else
|
| 100 | all: $(LIB_STATIC) $(LIB_SHARED)
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 101 |
|
| 102 | $(LIB_STATIC) : $(OBJS)
|
| 103 | $(AR) rcs $(LIB_STATIC) $(OBJS)
|
| 104 |
|
| 105 | $(LIB_SHARED): $(OBJS)
|
| 106 | $(CC) $(LDFLAGS) $(LDFLAGS_SHARED) -o $@ $^
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 | clean:
|
| 112 | rm -f $(lib_OBJECTS) $(LIB_SHARED) $(LIB_STATIC) *.elf *.gdb *.o core
|
| 113 |
|
| 114 | romfs:
|
| 115 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 116 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 117 |
|
| 118 |
|