Added the npe-ucode package to create the microcode for the IXP4XX NPE ethernet drive...
[openwrt/svn-archive/archive.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.3
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=IPL_ixp400NpeLibrary-2_3.zip
17 PKG_SOURCE_URL:=http://www.intel.com/design/network/products/npfamily/ixp400_current.htm
18 PKG_CAT:=unzip
19
20 include $(INCLUDE_DIR)/unpack.mk
21
22 $(PKG_BUILD_DIR)/.prepared:
23 mkdir $(PKG_BUILD_DIR)
24 $(PKG_UNPACK)
25 mv $(PKG_BUILD_DIR)/ixp400_xscale_sw/src/npeDl/IxNpeMicrocode.c $(PKG_BUILD_DIR)/
26 rm -rf $(PKG_BUILD_DIR)/ixp400_xscale_sw
27 $(CP) ./src/* $(PKG_BUILD_DIR)/
28 touch $@
29
30 $(PKG_BUILD_DIR)/NPE-B: $(PKG_BUILD_DIR)/.prepared
31 ( cd $(PKG_BUILD_DIR) ; \
32 $(HOSTCC) -Wall IxNpeMicrocode.c -o IxNpeMicrocode ; \
33 ./IxNpeMicrocode -be )
34
35 $(DL_DIR)/$(PKG_SOURCE):
36 mkdir -p $(DL_DIR)
37 echo "You must manually download $(PKG_SOURCE) from $(PKG_SOURCE_URL) and put it in $(DL_DIR)."
38 echo "You will need to agree to the Intel Public License to do so - please do read it!"
39 false
40
41 download: $(DL_DIR)/$(PKG_SOURCE)
42 prepare: $(PKG_BUILD_DIR)/.prepared
43 compile: $(PKG_BUILD_DIR)/NPE-B
44
45 ifneq ($(TARGET),)
46 install: compile
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(TARGET)/
48 endif
49
50 clean:
51 rm -rf $(PKG_BUILD_DIR)