Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #
  2. # Copyright (C) 2012 Xiangfu Liu <xiangfu@openmobilefree.net>
  3. # bitcoin: 12h6gdGnThW385JaX1LRMA8cXKmbYRTP8Q
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=fpgatools
  10. PKG_VERSION:=$(shell date +%Y%m%d)
  11. PKG_REV:=HEAD
  12. PKG_RELEASE:=1
  13. PKG_INSTALL:=1
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
  15. PKG_SOURCE_URL:=git://github.com/Wolfgang-Spraul/fpgatools.git
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_SOURCE_VERSION:=$(PKG_REV)
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/fpgatools/Default
  21. MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=fpgatools
  25. URL:=https://github.com/ckolivas/fpgatools
  26. DEPENDS:=+libusb-compat +libftdi
  27. endef
  28. define Package/fpgatools/description
  29. fpgatools is a toolchain to program field-programmable gate arrays (FPGAs)
  30. endef
  31. TARGET_LDFLAGS += -lusb -lftdi
  32. define Build/Compile
  33. $(call Build/Compile/Default, fp2bit, bit2fp)
  34. $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/mini-jtag \
  35. $(MAKE_FLAGS) \
  36. DESTDIR="$(PKG_INSTALL_DIR)" \
  37. all install
  38. endef
  39. define Package/fpgatools
  40. $(call Package/fpgatools/Default)
  41. TITLE+=(fpgatools)
  42. endef
  43. define Package/fpgatools/install
  44. $(INSTALL_DIR) $(1)/usr/bin
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/fp2bit $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/bit2fp $(1)/usr/bin
  48. $(INSTALL_DATA) \
  49. $(PKG_INSTALL_DIR)/usr/local/lib/libfpga-* \
  50. $(1)/usr/lib/
  51. endef
  52. define Package/mini-jtag
  53. $(call Package/fpgatools/Default)
  54. DEPENDS:=+libusb-compat +libftdi
  55. TITLE+=(mini-jtag)
  56. endef
  57. define Package/mini-jtag/install
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/mini-jtag $(1)/usr/bin
  60. endef
  61. $(eval $(call BuildPackage,fpgatools))
  62. $(eval $(call BuildPackage,mini-jtag))