allwinner-midware/app/netease_voice_common_module/Makefile

120 lines
2.8 KiB
Makefile
Raw Normal View History

2018-09-04 12:07:33 +00:00
include $(TOPDIR)/rules.mk
include $(TINA_BUILD_TOP)/package/netease/Makefile.common
2018-09-12 09:28:29 +00:00
PKG_NAME:=netease_voice
2018-09-04 12:07:33 +00:00
PKG_RELEASE:=1
PKG_VERSION:=0.0.1
PKG_BUILD_DIR := $(COMPILE_DIR)/$(PKG_NAME)
include $(BUILD_DIR)/package.mk
$(info CONFIG_XUNFEI_MSC_SDK=$(CONFIG_XUNFEI_MSC_SDK))
$(info CONFIG_XUNFEI_TTS_SDK=$(CONFIG_XUNFEI_TTS_SDK))
$(info CONFIG_XUNFEI_CAE_SDK=$(CONFIG_XUNFEI_CAE_SDK))
$(info CONFIG_NETEASE_MSC_SDK=$(CONFIG_NETEASE_MSC_SDK))
$(info CONFIG_NETEASE_CAE_SDK=$(CONFIG_NETEASE_CAE_SDK))
$(info CONFIG_USED_DC_SDK=$(CONFIG_USED_DC_SDK))
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Netease
2018-09-12 09:28:29 +00:00
TITLE:=Netease voice main program in submodule
2018-09-04 12:07:33 +00:00
MAINTAINER:=Wang zijiao <hzwangzijiao@corp.netease.com>
2018-11-28 06:25:12 +00:00
DEPENDS:=+libneteasedc +libneteasevoicews +libduilite +libjansson +libspeex +alsa-lib +libuws +libjson-c +libyunxin +libcutils $(MAKE_COMMON_DEPEND)
2018-09-04 12:07:33 +00:00
ifeq ('$(CONFIG_XUNFEI_MSC_SDK)', 'y')
2018-11-28 06:25:12 +00:00
DEPENDS+= +libmsc
2018-09-04 12:07:33 +00:00
else ifeq ('$(CONFIG_XUNFEI_TTS_SDK)', 'y')
2018-11-28 06:25:12 +00:00
DEPENDS+= +libmsc
2018-09-04 12:07:33 +00:00
endif
ifeq ('$(CONFIG_XUNFEI_CAE_SDK)', 'y')
2018-11-28 06:25:12 +00:00
DEPENDS+= +libcae
TARGET_CFLAGS+= -DENABLE_MODULE_XUNFEICAE=1
2018-09-04 12:07:33 +00:00
endif
ifeq ('$(CONFIG_NETEASE_MSC_SDK)', 'y')
2018-11-28 06:25:12 +00:00
DEPENDS+= +libneteasevoicews
2018-09-04 12:07:33 +00:00
endif
ifeq ('$(CONFIG_NETEASE_CAE_SDK)', 'y')
2018-11-28 06:25:12 +00:00
DEPENDS+= +libfmae
2018-09-04 12:07:33 +00:00
endif
ifeq ('$(CONFIG_NETEASE_DUILITE_SDK)', 'y')
2018-11-28 06:25:12 +00:00
DEPENDS+= +libduilite
TARGET_CFLAGS+= -DENABLE_MODULE_DUILITE=1
2018-09-04 12:07:33 +00:00
endif
ifeq ('$(CONFIG_USED_DC_SDK)', 'y')
2018-11-28 06:25:12 +00:00
DEPENDS+= +libneteasedc
2018-09-04 12:07:33 +00:00
endif
endef
ifeq ('$(CONFIG_NETEASE_DUILITE_SDK)', 'y')
TARGET_LDFLAGS += -lauth_tina -lduilite
endif
ifeq ('$(CONFIG_XUNFEI_MSC_SDK)', 'y')
TARGET_LDFLAGS += -lmsc
else ifeq ('$(CONFIG_XUNFEI_TTS_SDK)', 'y')
TARGET_LDFLAGS += -lmsc
endif
ifeq ('$(CONFIG_XUNFEI_CAE_SDK)', 'y')
TARGET_LDFLAGS += -lcae
endif
ifeq ('$(CONFIG_NETEASE_MSC_SDK)', 'y')
TARGET_LDFLAGS += -lsrcws
endif
ifeq ('$(CONFIG_NETEASE_CAE_SDK)', 'y')
TARGET_LDFLAGS += -lfmae
endif
ifeq ('$(CONFIG_USED_DC_SDK)', 'y')
TARGET_LDFLAGS += -ldc
endif
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
define Package/$(PKG_NAME)/description
Netease voice triger, tts, speech recognition main program added by wzj!
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) -d ./src/ $(PKG_BUILD_DIR)/
endef
define Build/Configure
endef
define Build/Compile
$(info TARGET_CFLAGS=$(TARGET_CFLAGS))
2018-09-04 12:07:33 +00:00
$(MAKE) -C $(PKG_BUILD_DIR)/src \
ARCH="$(TARGET_ARCH)" \
AR="$(TARGET_AR)" \
CC="$(TARGET_CC)" \
CXX="$(TARGET_CXX)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
TARGET_NAME=$(PKG_NAME) \
all
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_DIR) $(1)/usr/share/netease
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/* $(1)/bin
$(INSTALL_BIN) ./res/* $(1)/usr/share/netease
endef
$(eval $(call BuildPackage,$(PKG_NAME)))