rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | # @see http://mtkswits01/~wimac |
| 2 | # @see libbase/Makefile |
| 3 | # @see libbase/Makefile.config |
| 4 | PREFIX = ../install |
| 5 | NAME = modemafectrl |
| 6 | COMPILER = GNU |
| 7 | CROSS = arm-linux- |
| 8 | CROSS_SUP= arm-linux- arm-none-eabi- aarch64-linux- |
| 9 | OFLAGS ?= -g -Os -fPIC -Wno-missing-braces |
| 10 | CFLAGS = $(OFLAGS) $(DEF_CFLAGS) |
| 11 | ifeq ($(strip $(CROSS)), arm-linux-) |
| 12 | CFLAGS += -mthumb-interwork |
| 13 | endif |
| 14 | INCLUDE_ADD = -I$(ROOT)/include/logger |
| 15 | CXXFLAGS = $(CFLAGS) $(CXXFLAGS_ADD) |
| 16 | CONFIG = |
| 17 | |
| 18 | DEP_LIBS = |
| 19 | BACH_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 | ## |
| 27 | INIT = syss_init |
| 28 | LDFLAGS = $(BB_LDFLAGS_ADD) -L. -L $(ROOT)/lib -L $(ROOT)/usr/lib -lpthread -lmodemafectrl -lasound -lmtk_audio_mixer_ctrl |
| 29 | LIB = lib$(NAME).a lib$(NAME).so |
| 30 | ALL = |
| 31 | CLEAN = |
| 32 | INSTALL = __install |
| 33 | STRICT = 1 |
| 34 | ROOT = $(PREFIX)/$(CROSS:%-=%) |
| 35 | include $(PREFIX)/Makefile.template |
| 36 | include $(PREFIX)/Makefile.config |
| 37 | |
| 38 | ifeq ($(BT_AUDIO_PCM_INTERFACE), yes) |
| 39 | CFLAGS += -DBT_AUDIO_PCM_SUPPORT |
| 40 | |
| 41 | endif |
| 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 | |
| 50 | pack_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 | |