upgrade npe microcode to v2.4
[openwrt-10.03/.git] / target / linux / ixp4xx-2.6 / image / npe-ucode / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=npe-ucode
12 PKG_VERSION:=2.4
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=IPL_ixp400NpeLibrary-2_4.zip
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Build/Prepare
21         rm -rf $(PKG_BUILD_DIR)
22         mkdir -p $(PKG_BUILD_DIR)
23         unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
24         mv $(PKG_BUILD_DIR)/ixp400_xscale_sw/src/npeDl/IxNpeMicrocode.c $(PKG_BUILD_DIR)/
25         rm -rf $(PKG_BUILD_DIR)/ixp400_xscale_sw
26         $(CP) ./src/* $(PKG_BUILD_DIR)/
27 endef
28
29 define Build/Compile
30         (cd $(PKG_BUILD_DIR); \
31                 $(HOSTCC) -Wall IxNpeMicrocode.c -o IxNpeMicrocode; \
32                 ./IxNpeMicrocode -be \
33         )
34 endef
35
36 define Build/InstallDev
37         $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(TARGET)/
38 endef
39
40 $(eval $(call Build/DefaultTargets))