SmartAudio/package/minigui/washing-machine/Makefile

89 lines
1.8 KiB
Makefile
Raw Normal View History

2018-07-13 01:31:50 +00:00
#
# Copyright (C) 2007-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=washing-machine
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(COMPILE_DIR)/$(PKG_NAME)
HAVE_SOURCE := yes
include $(BUILD_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=gui
CATEGORY:=Minigui
DEPENDS:= +libminigui-gpl +alsa-utils +tslib
TITLE:=washing-machine
MAINTAINER:=xlf<xielinfei@allwinnertech.com>
endef
define Package/$(PKG_NAME)/description
The minigui application for Demo
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)/
$(CP) -r ./src $(PKG_BUILD_DIR)/
endef
TARGET_LDFLAGS+=-lfreetype
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/src \
MAKE="$(MAKE)" \
ARCH="$(TARGET_ARCH)" \
AR="$(TARGET_AR)" \
CC="$(TARGET_CC)" \
CXX="$(TARGET_CXX)" \
CFLAGS="$(TARGET_CFLAGS)"\
LDFLAGS="$(TARGET_LDFLAGS)" \
CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \
all
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/res
$(INSTALL_DIR) $(1)/usr/local/etc
$(INSTALL_DIR) $(1)/etc/init.d/
$(CP) \
$(PKG_BUILD_DIR)/src/washing-machine \
$(1)/usr/bin/
$(CP) \
$(PKG_BUILD_DIR)/src/res/* \
$(1)/usr/res/
ifeq ($(TARGET_BOARD_PLATFORM),astar)
$(CP) \
$(PKG_BUILD_DIR)/src/res/MiniGUI_R16.cfg \
$(1)/usr/local/etc/MiniGUI.cfg
$(CP) \
$(PKG_BUILD_DIR)/src/pointercal_R16 \
$(1)/etc/pointercal
else ifeq ($(TARGET_BOARD_PLATFORM),sitar)
$(CP) \
$(PKG_BUILD_DIR)/src/res/MiniGUI_R6.cfg \
$(1)/usr/local/etc/MiniGUI.cfg
$(CP) \
$(PKG_BUILD_DIR)/src/pointercal_R6 \
$(1)/etc/pointercal
else
$(CP) \
$(PKG_BUILD_DIR)/src/res/MiniGUI.cfg \
$(1)/usr/local/etc/
$(CP) \
$(PKG_BUILD_DIR)/src/pointercal \
$(1)/etc/
endif
endef
$(eval $(call BuildPackage,$(PKG_NAME)))