blob: fb5acd541d29538a187041936e245cdb7eb812fe [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# /*****************************************************************************
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#*******************************************************************************
18include $(COMMON_MK)
19
20
21#*******************************************************************************
22# library
23#*******************************************************************************
24LIB_SHARED = libaudiomix.so
25LIB_STATIC = libaudiomix.a
26
27OBJS = mix.o mixtest.o
28CFLAGS += -g
29LDFLAGS += -lpthread
30
31##############USER COMIZE END##################
32
33CFLAGS += -I$(zte_lib_path)/libaudiomix/include
34CFLAGS += -I$(STAGEDIR)/include
35CFLAGS += -I$(APP_DIR)/include
36CFLAGS += -fPIC
37
38LDFLAGS_SHARED += -shared
39
40
41#*******************************************************************************
42# comp test app and
43#*******************************************************************************
44EXEC_mixtest = mixtest
45
46
47#*******************************************************************************
48# objects
49#*******************************************************************************
50mixtest_OBJECTS += mix.o mixtest.o
51
52
53
54#########################for linux######################################
55ifeq ($(V3PHONE_TYPE), K318)
56 CFLAGS += -D_USE_7520V3_PHONE_TYPE_K318
57endif
58ifeq ($(V3PHONE_TYPE), C31F)
59 CFLAGS += -D_USE_7520V3_PHONE_TYPE_C31F
60endif
61ifeq ($(V3PHONE_TYPE), XRSD)
62 CFLAGS += -D_USE_7520V3_PHONE_TYPE_XRSD
63endif
64ifeq ($(V3PHONE_TYPE), FWP)
65 CFLAGS += -D_USE_7520V3_PHONE_TYPE_FWP
66endif
67ifeq ($(V3PHONE_TYPE), WTWD)
68 CFLAGS += -D_USE_7520V3_PHONE_TYPE_WTWD
69endif
70
71
72
73CFLAGS += -I./include/
74CFLAGS += -g -Werror=implicit-function-declaration
75SHAREDFLAG := -shared -lc
76LDLIBS += -L$(LIB_DIR)/libtinyalsa
77LDLIBS += -ltinyalsa
78
79all: $(LIB_STATIC) $(LIB_SHARED) $(EXEC_mixtest)
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_mixtest): $(mixtest_OBJECTS)
89 $(CC) $(LDFLAGS) -o $@ $(mixtest_OBJECTS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
90
91clean:
92 rm -f $(mixtest_OBJECTS) $(lib_OBJECTS) $(LIB_SHARED) $(LIB_STATIC) $(EXEC_mixtest) *.elf *.gdb *.o core
93
94romfs:
95 $(ROMFSINST) $(LIB_SHARED) /lib/$(LIB_SHARED)
96
97 cp -v $(EXEC_mixtest) $(APP_DIR)/test_tools/
98
99
100