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