1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 10:36:26 +02:00

fpgatools: rename mini-jtag to fpgatools, include fp2bit/bit2fp

This commit is contained in:
Xiangfu 2012-10-23 23:07:56 +08:00
parent 45cd9dd671
commit a295fd46eb
3 changed files with 102 additions and 45 deletions

60
fpgatools/Makefile Normal file
View File

@ -0,0 +1,60 @@
#
# Copyright (C) 2012 Xiangfu Liu <xiangfu@openmobilefree.net>
# bitcoin: 12h6gdGnThW385JaX1LRMA8cXKmbYRTP8Q
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fpgatools
PKG_VERSION:=$(shell date +%Y%m%d)
PKG_REV:=HEAD
PKG_RELEASE:=1
PKG_INSTALL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
PKG_SOURCE_URL:=git://github.com/Wolfgang-Spraul/fpgatools.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
include $(INCLUDE_DIR)/package.mk
define Package/fpgatools
MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
SECTION:=utils
CATEGORY:=Utilities
TITLE:=fpgatools
URL:=https://github.com/ckolivas/fpgatools
DEPENDS:=+libusb +libftdi
endef
define Package/fpgatools/description
fpgatools is a toolchain to program field-programmable gate arrays (FPGAs)
endef
TARGET_LDFLAGS += -lusb -lftdi
define Build/Compile
$(call Build/Compile/Default, fp2bit, bit2fp)
$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/mini-jtag \
$(MAKE_FLAGS) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/fpgatools/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/mini-jtag $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/fp2bit $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/bit2fp $(1)/usr/bin
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/local/lib/libfpga-* \
$(1)/usr/lib/
endef
$(eval $(call BuildPackage,fpgatools))

View File

@ -0,0 +1,42 @@
diff --git a/Makefile b/Makefile
index 1aed6d1..a44dbe0 100644
--- a/Makefile
+++ b/Makefile
@@ -245,8 +245,6 @@ install: fp2bit bit2fp
mkdir -p $(DESTDIR)/$(PREFIX)/bin/
install -m 755 fp2bit $(DESTDIR)/$(PREFIX)/bin/
install -m 755 bit2fp $(DESTDIR)/$(PREFIX)/bin/
- chrpath -d $(DESTDIR)/$(PREFIX)/bin/fp2bit
- chrpath -d $(DESTDIR)/$(PREFIX)/bin/bit2fp
uninstall:
@make -C libs uninstall
diff --git a/libs/Makefile b/libs/Makefile
index 159125a..1628cae 100644
--- a/libs/Makefile
+++ b/libs/Makefile
@@ -27,7 +27,7 @@ DYNAMIC_HEADS = bit.h control.h floorplan.h helper.h model.h parts.h
SHARED_FLAGS = -shared -Wl,-soname,$@.$(LIBS_VERSION_MAJOR)
.PHONY: all clean install uninstall FAKE
-all: $(DYNAMIC_LIBS) $(DYNAMIC_LIBS:.so=.a)
+all: $(DYNAMIC_LIBS)
include ../Makefile.common
@@ -75,15 +75,11 @@ install: all
mkdir -p $(DESTDIR)/$(PREFIX)/lib/
install -m 644 $(DYNAMIC_HEADS) $(DESTDIR)/$(PREFIX)/include/
for f in $(DYNAMIC_LIBS); do \
- chrpath -d $$f.$(LIBS_VERSION_MAJOR) && \
install -m 644 $$f.$(LIBS_VERSION) $(DESTDIR)/$(PREFIX)/lib/$$f.$(LIBS_VERSION) && \
(cd $(DESTDIR)/$(PREFIX)/lib/ && \
ln -sf $$f.$(LIBS_VERSION) $$f.$(LIBS_VERSION_MAJOR) && \
ln -sf $$f.$(LIBS_VERSION_MAJOR) $$f) \
|| exit 1; done
- for f in $(DYNAMIC_LIBS:.so=.a); do \
- install -m 644 $$f $(DESTDIR)/$(PREFIX)/lib/$$f \
- || exit 1; done
uninstall:
for f in $(DYNAMIC_HEADS); do rm -f $(DESTDIR)/$(PREFIX)/include/$$f || exit 1; done

View File

@ -1,45 +0,0 @@
#
# Copyright (C) 2012 Xiangfu Liu <xiangfu@openmobilefree.net>
# bitcoin: 12h6gdGnThW385JaX1LRMA8cXKmbYRTP8Q
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mini-jtag
PKG_VERSION:=$(shell date +%Y%m%d)
PKG_REV:=HEAD
PKG_RELEASE:=1
PKG_INSTALL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
PKG_SOURCE_URL:=git://github.com/xiangfu/mini-jtag.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
include $(INCLUDE_DIR)/package.mk
define Package/mini-jtag
MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
SECTION:=utils
CATEGORY:=Utilities
TITLE:=mini-jtag
URL:=https://github.com/ckolivas/mini-jtag
DEPENDS:=+libusb +libftdi
endef
define Package/mini-jtag/description
Mini-jtag is a minimal jtag for communicate with fpga chip
endef
TARGET_LDFLAGS += -lusb -lftdi
define Package/mini-jtag/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mini-jtag $(1)/usr/bin
endef
$(eval $(call BuildPackage,mini-jtag))