# *****************************************************************
# This file is part of the book "Embedded Linux - Das Praxisbuch"
#
# Copyright (C) 2008-2012 Joachim Schroeder
# Chair Prof. Dillmann (IAIM),
# Institute for Computer Science and Engineering,
# University of Karlsruhe. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# *****************************************************************

# *****************************************************************
# Filename:  Makefile
# Copyright: Joachim Schroeder, Chair Prof. Dillmann (IAIM),
#            Institute for Computer Science and Engineering (CSE),
#            University of Karlsruhe. All rights reserved.
# Author:    Joachim Schroeder
# Date:      29.06.2008
# *****************************************************************

include $(TOPDIR)/rules.mk

# Name and release number of this package
PKG_NAME:=helloworld
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

# Build-Directory
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

# Set package category under which it appears in configuration
define Package/helloworld
	SECTION:=utils
	CATEGORY:=MyPackages
	TITLE:=Hello World
endef

# Set package description
define Package/helloworld/description
	This is just a test package
endef

# Copy local source files from package into build directory to prepare build process
define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./$(PKG_NAME)-$(PKG_VERSION)/* $(PKG_BUILD_DIR)/
endef

# Specify where to install the binaries
define Package/helloworld/install
	$(INSTALL_DIR) $(1)/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/bin/
endef

# Compile package
$(eval $(call BuildPackage,helloworld))
	

