Root/fpgatools/Makefile

Source at commit bfeda4f4e607cc518728badef5dcbcb3db4557b1 created 6 years 5 months ago.
By Xiangfu, update libusb name to libusb-compat
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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=fpgatools
12PKG_VERSION:=$(shell date +%Y%m%d)
13PKG_REV:=HEAD
14PKG_RELEASE:=1
15PKG_INSTALL:=1
16
17PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
18PKG_SOURCE_URL:=git://github.com/Wolfgang-Spraul/fpgatools.git
19PKG_SOURCE_PROTO:=git
20PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21PKG_SOURCE_VERSION:=$(PKG_REV)
22
23include $(INCLUDE_DIR)/package.mk
24
25define 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
31endef
32
33define Package/fpgatools/description
34fpgatools is a toolchain to program field-programmable gate arrays (FPGAs)
35endef
36
37TARGET_LDFLAGS += -lusb -lftdi
38define 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
44endef
45
46define Package/fpgatools
47    $(call Package/fpgatools/Default)
48    TITLE+=(fpgatools)
49endef
50
51define 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/
60endef
61
62define Package/mini-jtag
63    $(call Package/fpgatools/Default)
64    DEPENDS:=+libusb-compat +libftdi
65    TITLE+=(mini-jtag)
66endef
67
68define Package/mini-jtag/install
69    $(INSTALL_DIR) $(1)/usr/bin
70    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/mini-jtag $(1)/usr/bin
71endef
72
73$(eval $(call BuildPackage,fpgatools))
74$(eval $(call BuildPackage,mini-jtag))
75

Archive Download this file



interactive