tools: zlib: do not hardcode the install prefix in zlib.pc
[openwrt/openwrt.git] / tools / wrt350nv2-builder / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wrt350nv2-builder
11 PKG_VERSION:=2.4
12 PKG_REVISION:=2
13
14 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/${PKG_NAME}-$(PKG_VERSION)
15
16 include $(INCLUDE_DIR)/host-build.mk
17
18 define Host/Compile
19 $(HOSTCC) $(HOST_CFLAGS) -c src/md5.c -o $(HOST_BUILD_DIR)/md5.o
20 $(HOSTCC) $(HOST_CFLAGS) -c src/ioapi.c -o $(HOST_BUILD_DIR)/ioapi.o
21 $(HOSTCC) $(HOST_CFLAGS) -c src/wrt350nv2-builder.c -o $(HOST_BUILD_DIR)/wrt350nv2-builder.o
22 $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $(HOST_BUILD_DIR)/wrt350nv2-builder \
23 $(HOST_BUILD_DIR)/wrt350nv2-builder.o $(HOST_BUILD_DIR)/md5.o $(HOST_BUILD_DIR)/ioapi.o
24 endef
25
26 define Host/Install
27 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
28 $(INSTALL_BIN) $(HOST_BUILD_DIR)/wrt350nv2-builder $(STAGING_DIR_HOST)/bin/
29 # optionally the builder can add a u-boot binary to create a complete webupgrade image, but this is not mandatory
30 # u-boot images from stock firmware are available at ftp://ftp.maddes.net/openwrt/trunk/orion/stock/binaries/
31 [ ! -f "files/u-boot.bin" ] || ( \
32 $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/wrt350nv2-builder; \
33 $(CP) files/u-boot.bin $(STAGING_DIR_HOST)/share/wrt350nv2-builder/; )
34 endef
35
36 define Host/Clean
37 rm -f $(STAGING_DIR_HOST)/bin/wrt350nv2-builder
38 rm -f $(STAGING_DIR_HOST)/share/wrt350nv2-builder
39 endef
40
41 $(eval $(call HostBuild))