blob: 6688531d2fb3690ba4ff7cebbc4d2688e702d61d [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 = # 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
38__install:
39 mkdir -p ../include
40 cp -af include/* ../include/
41
42 mkdir -p $(ROOT)/${base_libdir}/
43 cp lib$(NAME).so $(ROOT)/${base_libdir}/
44
45pack_rootfs:
46 # Shared library
47 mkdir -p $(PACK_TO)/${base_libdir}/
48 cp -af $(ROOT)/${base_libdir}/lib$(NAME).so $(PACK_TO)/${base_libdir}/
49 $(CROSS)strip $(PACK_TO)/${base_libdir}/lib$(NAME).so
50 ls -R $(PACK_TO)/${base_libdir}/lib$(NAME).so >> $(LIST)
51 du -c -h $(PACK_TO)/${base_libdir}/lib$(NAME).so >> $(SIZE)
52