| PREFIX = ../install |
| NAME = modemafectrl |
| COMPILER = GNU |
| CROSS = arm-linux- |
| CROSS_SUP= arm-linux- arm-none-eabi- aarch64-linux- |
| GCC = $(CROSS)gcc |
| CC = $(GCC) |
| CXX = $(CROSS)g++ |
| OBJDUMP = $(CROSS)objdump |
| OBJCOPY = $(CROSS)objcopy |
| AR = $(CROSS)ar |
| |
| OFLAGS ?= -g -O0 -fPIC -Wno-missing-braces |
| |
| ifeq ($(strip $(CROSS)), arm-linux-) |
| CFLAGS = -mthumb-interwork |
| endif |
| |
| INIT = syss_init |
| LDFLAGS = $(BB_LDFLAGS_ADD) -Wl,--hash-style=gnu -L. -L $(ROOT)/lib |
| LOCAL_PATH = . |
| |
| |
| all: libmodemafectrl.so |
| |
| INCLUDE = -Iinclude |
| |
| libmodemafectrl.so: pcm_ctrl.o |
| $(CC) $(OFLAGS) $(INCLUDE) ${LDFLAGS} -lasound -lmtk_audio_mixer_ctrl -shared -o $@ pcm_ctrl.o |
| |
| pcm_ctrl.o: include/ |
| $(CC) $(OFLAGS) $(INCLUDE) ${CFLAGS} -c src/pcm_ctrl.c -o $@ |
| |
| install: |
| mkdir -p ../include |
| cp -af include/* ../include/ |
| |
| mkdir -p $(ROOT)/${base_libdir}/ |
| cp lib$(NAME).so $(ROOT)/${base_libdir}/ |
| |
| clean: |
| rm -f libmodemafectrl.so |