SmartAudio/package/allwinner/duer_demo/Makefile

52 lines
1.2 KiB
Makefile
Raw Normal View History

2018-07-13 01:31:50 +00:00
include $(TOPDIR)/rules.mk
PKG_NAME:=duer_demo
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(COMPILE_DIR)/$(PKG_NAME)
include $(BUILD_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Allwinner
TITLE:=DuerOS demo
DEPENDS:=+libduersdk
endef
define Package/$(PKG_NAME)/description
A test program of DuerOS
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) -r ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/ \
ARCH="$(TARGET_ARCH)" \
AR="$(TARGET_AR)" \
CC="$(TARGET_CC)" \
CXX="$(TARGET_CXX)" \
CFLAGS="$(TARGET_CFLAGS)" \
CXXFLAGS="$(TARGET_CXXFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
TARGET_BOARD="$(TARGET_BOARD_PLATFORM)" \
all
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
$(INSTALL_DIR) $(1)/root/$(PKG_NAME)/resources
$(INSTALL_DATA) ./resources/* $(1)/root/$(PKG_NAME)/resources/
$(INSTALL_DIR) $(1)/root/$(PKG_NAME)/sdkconfigs
$(INSTALL_DATA) ./sdkconfigs/* $(1)/root/$(PKG_NAME)/sdkconfigs/
$(INSTALL_DIR) $(1)/root/$(PKG_NAME)/records
$(INSTALL_DATA) ./records/* $(1)/root/$(PKG_NAME)/records/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))