OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 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 | |
| 9 | include $(TOPDIR)/rules.mk |
| 10 | |
| 11 | PKG_NAME:=fpgatools |
| 12 | PKG_VERSION:=$(shell date +%Y%m%d) |
| 13 | PKG_REV:=HEAD |
| 14 | PKG_RELEASE:=1 |
| 15 | PKG_INSTALL:=1 |
| 16 | |
| 17 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz |
| 18 | PKG_SOURCE_URL:=git://github.com/Wolfgang-Spraul/fpgatools.git |
| 19 | PKG_SOURCE_PROTO:=git |
| 20 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) |
| 21 | PKG_SOURCE_VERSION:=$(PKG_REV) |
| 22 | |
| 23 | include $(INCLUDE_DIR)/package.mk |
| 24 | |
| 25 | define Package/fpgatools/Default |
| 26 | MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc> |
| 27 | SECTION:=utils |
| 28 | CATEGORY:=Utilities |
| 29 | TITLE:=fpgatools |
| 30 | URL:=https://github.com/ckolivas/fpgatools |
| 31 | endef |
| 32 | |
| 33 | define Package/fpgatools/description |
| 34 | fpgatools is a toolchain to program field-programmable gate arrays (FPGAs) |
| 35 | endef |
| 36 | |
| 37 | TARGET_LDFLAGS += -lusb -lftdi |
| 38 | define Build/Compile |
| 39 | $(call Build/Compile/Default, fp2bit, bit2fp) |
| 40 | $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/mini-jtag \ |
| 41 | $(MAKE_FLAGS) \ |
| 42 | DESTDIR="$(PKG_INSTALL_DIR)" \ |
| 43 | all install |
| 44 | endef |
| 45 | |
| 46 | define Package/fpgatools |
| 47 | $(call Package/fpgatools/Default) |
| 48 | TITLE+=(fpgatools) |
| 49 | endef |
| 50 | |
| 51 | define Package/fpgatools/install |
| 52 | $(INSTALL_DIR) $(1)/usr/bin |
| 53 | $(INSTALL_DIR) $(1)/usr/lib |
| 54 | |
| 55 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/fp2bit $(1)/usr/bin |
| 56 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/bit2fp $(1)/usr/bin |
| 57 | $(INSTALL_DATA) \ |
| 58 | $(PKG_INSTALL_DIR)/usr/local/lib/libfpga-* \ |
| 59 | $(1)/usr/lib/ |
| 60 | endef |
| 61 | |
| 62 | define Package/mini-jtag |
| 63 | $(call Package/fpgatools/Default) |
| 64 | DEPENDS:=+libusb-compat +libftdi |
| 65 | TITLE+=(mini-jtag) |
| 66 | endef |
| 67 | |
| 68 | define Package/mini-jtag/install |
| 69 | $(INSTALL_DIR) $(1)/usr/bin |
| 70 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/mini-jtag $(1)/usr/bin |
| 71 | endef |
| 72 | |
| 73 | $(eval $(call BuildPackage,fpgatools)) |
| 74 | $(eval $(call BuildPackage,mini-jtag)) |
| 75 |
