blob: 7910642ed53174d4721226b8a785e06d8d20c31d [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001# @see http://mtkswits01/~wimac
2# @see libbase/Makefile
3# @see libbase/Makefile.config
4PREFIX = ../install
5NAME = modemafectrl
6COMPILER = GNU
7CROSS = arm-linux-
8CROSS_SUP= arm-linux- arm-none-eabi- aarch64-linux-
9OFLAGS ?= -g -Os -fPIC -Wno-missing-braces
10CFLAGS = $(OFLAGS) $(DEF_CFLAGS)
11ifeq ($(strip $(CROSS)), arm-linux-)
12 CFLAGS += -mthumb-interwork
13endif
14INCLUDE_ADD = -I$(ROOT)/include/logger
15CXXFLAGS = $(CFLAGS) $(CXXFLAGS_ADD)
16CONFIG =
17
18DEP_LIBS =
19BACH_BUILD_DEP = liblogger # Bach asynchronous build dependency directives
20##
21# @brief
22# base_init: single alone application
23# bsp_init - single alone application with IRQ support (CISR object)
24# syss_init - with threadX operating system
25# @note active iff NEWLIB=1
26##
27INIT = syss_init
28LDFLAGS = $(BB_LDFLAGS_ADD) -L. -L $(ROOT)/lib -L $(ROOT)/usr/lib -lpthread -lmodemafectrl -lasound -lmtk_audio_mixer_ctrl
29LIB = lib$(NAME).a lib$(NAME).so
30ALL =
31CLEAN =
32INSTALL = __install
33STRICT = 1
34ROOT = $(PREFIX)/$(CROSS:%-=%)
35include $(PREFIX)/Makefile.template
36include $(PREFIX)/Makefile.config
37
38ifeq ($(BT_AUDIO_PCM_INTERFACE), yes)
39 CFLAGS += -DBT_AUDIO_PCM_SUPPORT
40
41endif
42
43__install:
44 mkdir -p ../include
45 cp -af include/* ../include/
46
47 mkdir -p $(ROOT)/${base_libdir}/
48 cp lib$(NAME).so $(ROOT)/${base_libdir}/
49
50pack_rootfs:
51 # Shared library
52 mkdir -p $(PACK_TO)/${base_libdir}/
53 cp -af $(ROOT)/${base_libdir}/lib$(NAME).so $(PACK_TO)/${base_libdir}/
54 $(CROSS)strip $(PACK_TO)/${base_libdir}/lib$(NAME).so
55 ls -R $(PACK_TO)/${base_libdir}/lib$(NAME).so >> $(LIST)
56 du -c -h $(PACK_TO)/${base_libdir}/lib$(NAME).so >> $(SIZE)
57