Makefile 1.5 KB

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