blob: a4293ac658ee1170edbda02a07cf2d9448253332 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001PREFIX = ../install
2NAME = modemafectrl
3COMPILER = GNU
4CROSS = arm-linux-
5CROSS_SUP= arm-linux- arm-none-eabi- aarch64-linux-
6GCC = $(CROSS)gcc
7CC = $(GCC)
8CXX = $(CROSS)g++
9OBJDUMP = $(CROSS)objdump
10OBJCOPY = $(CROSS)objcopy
11AR = $(CROSS)ar
12
13OFLAGS ?= -g -O0 -fPIC -Wno-missing-braces
14
15ifeq ($(strip $(CROSS)), arm-linux-)
16 CFLAGS = -mthumb-interwork
17endif
18
19INIT = syss_init
20LDFLAGS = $(BB_LDFLAGS_ADD) -Wl,--hash-style=gnu -L. -L $(ROOT)/lib
21LOCAL_PATH = .
22
23
24all: libmodemafectrl.so
25
26INCLUDE = -Iinclude
27
28libmodemafectrl.so: pcm_ctrl.o
29 $(CC) $(OFLAGS) $(INCLUDE) ${LDFLAGS} -lasound -lmtk_audio_mixer_ctrl -shared -o $@ pcm_ctrl.o
30
31pcm_ctrl.o: include/
32 $(CC) $(OFLAGS) $(INCLUDE) ${CFLAGS} -c src/pcm_ctrl.c -o $@
33
34install:
35 mkdir -p ../include
36 cp -af include/* ../include/
37
38 mkdir -p $(ROOT)/${base_libdir}/
39 cp lib$(NAME).so $(ROOT)/${base_libdir}/
40
41clean:
42 rm -f libmodemafectrl.so