1a1ab1b28b6cfbdd090d3e48285471f880931a66
[15.05/openwrt.git] / package / boot / apex / Makefile
1 #
2 # Copyright (C) 2006-2011 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:=apex
11 PKG_VERSION:=1.6.9
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
16 PKG_MD5SUM:=9606cf2e3fd2c9a86fe0b61388509a30
17 PKG_TARGETS:=bin
18
19 include $(INCLUDE_DIR)/package.mk
20
21 export GCC_HONOUR_COPTS=s
22
23 define Package/apex
24   SECTION:=boot
25   CATEGORY:=Boot Loaders
26   DEPENDS:=@TARGET_ixp4xx
27   DEFAULT:=y
28   TITLE:=Boot loader for NSLU2, FSG3, NAS100D and others
29   URL:=http://wiki.buici.com/wiki/Apex_Bootloader
30 endef
31
32 define build_apex
33         $(MAKE) -C $(PKG_BUILD_DIR) \
34                 ARCH=arm \
35                 $(1)_config
36         $(MAKE) -C $(PKG_BUILD_DIR) \
37                 $(TARGET_CONFIGURE_OPTS) \
38                 KBUILD_HAVE_NLS=no \
39                 ARCH=arm \
40                 clean all
41         $(INSTALL_BIN) $(PKG_BUILD_DIR)/apex.bin $(PKG_BUILD_DIR)/out/apex-$(2).bin
42 endef
43
44 define Build/Compile
45         $(INSTALL_DIR) $(PKG_BUILD_DIR)/out
46         $(call build_apex,slugos-nslu2-armeb,nslu2-armeb)
47         $(call build_apex,slugos-nslu2-16mb-armeb,nslu2-16mb-armeb)
48         $(call build_apex,slugos-fsg3-armeb,fsg3-armeb)
49         $(call build_apex,slugos-nas100d-armeb,nas100d-armeb)
50 endef
51
52 define Package/apex/install
53         $(INSTALL_DIR) $(STAGING_DIR)/apex
54         $(CP) $(PKG_BUILD_DIR)/out/*.bin $(1)/
55 endef
56
57 $(eval $(call BuildPackage,apex))