2009-12-12 00:44:03 +00:00
|
|
|
#
|
2012-08-10 19:26:58 +00:00
|
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
2009-12-12 00:44:03 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=wrt350nv2-builder
|
2012-04-04 16:06:25 +00:00
|
|
|
PKG_VERSION:=2.4
|
2012-08-14 10:33:43 +00:00
|
|
|
PKG_REVISION:=2
|
2009-12-12 00:44:03 +00:00
|
|
|
|
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/${PKG_NAME}-$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
|
|
|
define Host/Compile
|
|
|
|
$(HOSTCC) $(HOST_CFLAGS) -c src/md5.c -o $(HOST_BUILD_DIR)/md5.o
|
|
|
|
$(HOSTCC) $(HOST_CFLAGS) -c src/ioapi.c -o $(HOST_BUILD_DIR)/ioapi.o
|
|
|
|
$(HOSTCC) $(HOST_CFLAGS) -c src/wrt350nv2-builder.c -o $(HOST_BUILD_DIR)/wrt350nv2-builder.o
|
2012-08-12 12:34:30 +00:00
|
|
|
$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_STATIC_LINKING) -o $(HOST_BUILD_DIR)/wrt350nv2-builder \
|
2012-08-10 19:26:58 +00:00
|
|
|
$(HOST_BUILD_DIR)/wrt350nv2-builder.o $(HOST_BUILD_DIR)/md5.o $(HOST_BUILD_DIR)/ioapi.o
|
2009-12-12 00:44:03 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
|
|
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/wrt350nv2-builder $(STAGING_DIR_HOST)/bin/
|
2010-02-12 01:40:57 +00:00
|
|
|
# optionally the builder can add a u-boot binary to create a complete webupgrade image, but this is not mandatory
|
2011-02-11 14:03:04 +00:00
|
|
|
# u-boot images from stock firmware are available at ftp://ftp.maddes.net/openwrt/trunk/orion/stock/binaries/
|
2010-02-12 01:40:57 +00:00
|
|
|
[ ! -f "files/u-boot.bin" ] || ( \
|
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_HOST)/share/wrt350nv2-builder; \
|
|
|
|
$(CP) files/u-boot.bin $(STAGING_DIR_HOST)/share/wrt350nv2-builder/; )
|
2009-12-12 00:44:03 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Clean
|
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/wrt350nv2-builder
|
2010-02-12 01:40:57 +00:00
|
|
|
rm -f $(STAGING_DIR_HOST)/share/wrt350nv2-builder
|
2009-12-12 00:44:03 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|