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 | #* 2018/01/15 V1.0 Create chentianming ´´½¨
|
| 12 | #*
|
| 13 | # ******************************************************************************/
|
| 14 |
|
| 15 | #*******************************************************************************
|
| 16 | # include ZTE library makefile
|
| 17 | #*******************************************************************************
|
| 18 | include $(COMMON_MK)
|
| 19 |
|
| 20 |
|
| 21 | #*******************************************************************************
|
| 22 | # library
|
| 23 | #*******************************************************************************
|
| 24 | LIB_SHARED = libtinyalsa.so
|
| 25 | LIB_STATIC = libtinyalsa.a
|
| 26 |
|
| 27 | ifeq ($(_APP_AUDIO_TYPE_),watch_cap)
|
| 28 | OBJS = mixer.o pcm.o mixer_ctrl_watch_cap.o
|
| 29 | else
|
| 30 | OBJS = mixer.o pcm.o audio_mixer_ctrl.o
|
| 31 | endif
|
| 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 | #*******************************************************************************
|
| 49 | EXEC_tinyplay = tinyplay
|
| 50 | EXEC_tinycap = tinycap
|
| 51 | EXEC_tinymix = tinymix
|
| 52 | EXEC_tinypcminfo = tinyinfo
|
| 53 | EXEC_alsatest = alsatest
|
| 54 | EXEC_voltest = voltest
|
| 55 |
|
| 56 | #*******************************************************************************
|
| 57 | # objects
|
| 58 | #*******************************************************************************
|
| 59 | tinyplay_OBJECTS += mixer.o pcm.o tinyplay.o
|
| 60 | tinycap_OBJECTS += mixer.o pcm.o tinycap.o
|
| 61 | tinymix_OBJECTS += mixer.o pcm.o tinymix.o
|
| 62 | tinypcminfo_OBJECTS += mixer.o pcm.o tinypcminfo.o
|
| 63 | alsatest_OBJECTS += mixer.o pcm.o alsatest.o
|
| 64 | voltest_OBJECTS += vol_test.o
|
| 65 | #########################for linux######################################
|
| 66 |
|
| 67 | ifeq ($(V3PHONE_TYPE), K318)
|
| 68 | CFLAGS += -D_USE_7520V3_PHONE_TYPE_K318
|
| 69 | endif
|
| 70 | ifeq ($(V3PHONE_TYPE), C31F)
|
| 71 | CFLAGS += -D_USE_7520V3_PHONE_TYPE_C31F
|
| 72 | endif
|
| 73 | ifeq ($(V3PHONE_TYPE), XRSD)
|
| 74 | CFLAGS += -D_USE_7520V3_PHONE_TYPE_XRSD
|
| 75 | endif
|
| 76 | ifeq ($(V3PHONE_TYPE), FWP)
|
| 77 | CFLAGS += -D_USE_7520V3_PHONE_TYPE_FWP
|
| 78 | endif
|
| 79 | ifeq ($(V3PHONE_TYPE), WTWD)
|
| 80 | CFLAGS += -D_USE_7520V3_PHONE_TYPE_WTWD
|
| 81 | endif
|
| 82 |
|
| 83 |
|
| 84 | CFLAGS += -I./include/
|
| 85 | CFLAGS += -g -Werror=implicit-function-declaration
|
| 86 | SHAREDFLAG := -shared -lc
|
| 87 | LDLIBS += -L$(LIB_DIR)/libtinyalsa
|
| 88 | LDLIBS += -ltinyalsa
|
| 89 |
|
| 90 | all: $(LIB_STATIC) $(LIB_SHARED) $(EXEC_tinyplay) $(EXEC_tinycap) $(EXEC_tinymix) $(EXEC_tinypcminfo)
|
| 91 |
|
| 92 | $(LIB_STATIC) : $(OBJS)
|
| 93 | $(AR) rcs $(LIB_STATIC) $(OBJS)
|
| 94 |
|
| 95 | $(LIB_SHARED): $(OBJS)
|
| 96 | $(CC) $(LDFLAGS) $(LDFLAGS_SHARED) -o $@ $^
|
| 97 |
|
| 98 |
|
| 99 | $(EXEC_tinyplay): $(tinyplay_OBJECTS)
|
| 100 | $(CC) $(LDFLAGS) -o $@ $(tinyplay_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 101 | $(EXEC_tinycap): $(tinycap_OBJECTS)
|
| 102 | $(CC) $(LDFLAGS) -o $@ $(tinycap_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 103 | $(EXEC_tinymix): $(tinymix_OBJECTS)
|
| 104 | $(CC) $(LDFLAGS) -o $@ $(tinymix_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 105 | $(EXEC_tinypcminfo): $(tinypcminfo_OBJECTS)
|
| 106 | $(CC) $(LDFLAGS) -o $@ $(tinypcminfo_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 107 | #$(EXEC_alsatest): $(alsatest_OBJECTS)
|
| 108 | # $(CC) $(LDFLAGS) -o $@ $(alsatest_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 109 | #$(EXEC_voltest): $(voltest_OBJECTS)
|
| 110 | # $(CC) $(LDFLAGS) -o $@ $(voltest_OBJECTS) -Wl,--start-group $(LDLIBS) -lm -Wl,--end-group
|
| 111 |
|
| 112 | clean:
|
| 113 | rm -f $(tinyplay_OBJECTS) $(tinycap_OBJECTS) $(tinymix_OBJECTS) $(tinypcminfo_OBJECTS) $(lib_OBJECTS) $(LIB_SHARED) $(LIB_STATIC) $(EXEC_tinyplay) $(EXEC_tinycap) $(EXEC_tinymix) $(EXEC_tinypcminfo) $(EXEC_alsatest) *.elf *.gdb *.o core
|
| 114 |
|
| 115 | romfs:
|
| 116 | $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame^] | 117 | $(ROMFSINST) $(EXEC_tinyplay) /bin/$(EXEC_tinyplay)
|
| 118 | $(ROMFSINST) $(EXEC_tinycap) /bin/$(EXEC_tinycap)
|
| 119 | $(ROMFSINST) $(EXEC_tinymix) /bin/$(EXEC_tinymix)
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 120 | #$(ROMFSINST) $(EXEC_tinypcminfo) /bin/$(EXEC_tinypcminfo)
|
| 121 | #$(ROMFSINST) $(EXEC_voltest) /bin/$(EXEC_voltest)
|
| 122 | cp -v $(EXEC_tinyplay) $(APP_DIR)/test_tools/
|
| 123 | cp -v $(EXEC_tinycap) $(APP_DIR)/test_tools/
|
| 124 | cp -v $(EXEC_tinymix) $(APP_DIR)/test_tools/
|
| 125 | cp -v $(EXEC_tinypcminfo) $(APP_DIR)/test_tools/
|
| 126 | # $(ROMFSINST) $(EXEC_alsatest) /bin/$(EXEC_alsatest)
|
| 127 |
|
| 128 |
|
| 129 | # cp $(EXEC_tinyplay) $(EXEC_tinyplay).elf
|
| 130 | # cp $(EXEC_tinycap) $(EXEC_tinycap).elf
|
| 131 |
|
| 132 | # cp $(EXEC_tinymix) $(EXEC_tinymix).elf
|
| 133 | # cp $(EXEC_tinypcminfo) $(EXEC_tinypcminfo).elf
|
| 134 | # cp $(EXEC_alsatest) $(EXEC_alsatest).elf
|