From: Uwe Hermann Date: Wed, 9 Jan 2013 18:34:06 +0000 (+0100) Subject: Use a standard autotools setup. X-Git-Tag: sigrok-firmware-fx2lafw-0.1.1~16 X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=commitdiff_plain;h=36074319ac7c80ac0d80334b8664d0bd8e6dee90 Use a standard autotools setup. fx2lafw now uses a standard autoconf/automake based build and configuration system like most other sigrok subprojects (instead of two sets of custom, not very portable Makefiles). $ ./configure && make && make install It now supports all the usual things one expects, for example: - The --prefix et. al. options to specify installation paths. - Standard set of 'make' targets, e.g. 'install', 'uninstall', 'dist', etc. - In-tree builds as well as out-of-tree builds. - Works pretty much everywhere portably, regardless of 'make' implementation (GNU Make or BSD make or...) and regardless of shell (bash, sh, dash, ksh, csh, ...). - The build output matches the usual 'silent rules' output of other (sigrok / autotools) projects. Using 'make V=1' one can get the full build output. --- diff --git a/.gitignore b/.gitignore index a8b39e3e..522b68ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,35 @@ +# autotools cruft +aclocal.m4 +autom4te.cache/ +config.h +config.h.in +config.log +config.status +configure +stamp-h1 +autostuff/ +ChangeLog +INSTALL + +# recursive autoconf leftovers +Makefile +Makefile.in + +# backup files *~ -*.adb +# various sdcc related files *.asm -*.bix -*.cdb *.ihx -*.iic -*.kpf *.lnk *.lst *.map *.mem *.rel *.rst -*.swp *.sym - -/hw/*/build/ +*.lib +*.fw +*.cdb +*.lk +*.omf diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..28c1b20e --- /dev/null +++ b/AUTHORS @@ -0,0 +1,7 @@ +------------------------------------------------------------------------------- +AUTHORS +------------------------------------------------------------------------------- + +Please check the source code files and/or git history and/or ChangeLog for +a list of all authors and contributors. + diff --git a/Makefile b/Makefile deleted file mode 100644 index fc8d4c10..00000000 --- a/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2012 Uwe Hermann -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -# sigrok-firmware-fx2lafw package/tarball version number. -VERSION = "0.1.0" - -DESTDIR ?= /usr/local/share/sigrok-firmware - -REPO = git://sigrok.org/sigrok-firmware-fx2lafw - -TARBALLDIR = sigrok-firmware-fx2lafw-$(VERSION) -TARBALLBINDIR = sigrok-firmware-fx2lafw-bin-$(VERSION) - -all: build-all - -build-all: saleae-logic cwav-usbeeax cwav-usbeedx cwav-usbeesx cypress-fx2 braintechnology-usb-lps - -saleae-logic: - @$(MAKE) -C hw/saleae-logic - -cwav-usbeeax: - @$(MAKE) -C hw/cwav-usbeeax - -cwav-usbeedx: - @$(MAKE) -C hw/cwav-usbeedx - -cwav-usbeesx: - @$(MAKE) -C hw/cwav-usbeesx - -cypress-fx2: - @$(MAKE) -C hw/cypress-fx2 - -braintechnology-usb-lps: - @$(MAKE) -C hw/braintechnology-usb-lps - -ChangeLog: - @git log > ChangeLog || touch ChangeLog - -dist: - @git clone $(REPO) $(TARBALLDIR) - @cd $(TARBALLDIR) && $(MAKE) ChangeLog && cd .. - @rm -rf $(TARBALLDIR)/.git - @tar -c -z -f $(TARBALLDIR).tar.gz $(TARBALLDIR) - @rm -rf $(TARBALLDIR) - -distbin: build-all ChangeLog - @mkdir $(TARBALLBINDIR) - @cp hw/*/build/*.fw $(TARBALLBINDIR) - @cp README NEWS ChangeLog $(TARBALLBINDIR) - @tar -c -z -f $(TARBALLBINDIR).tar.gz $(TARBALLBINDIR) - @rm -rf $(TARBALLBINDIR) - @rm -f ChangeLog - -install: build-all - @mkdir -p $(DESTDIR) - @cp hw/saleae-logic/build/*.fw $(DESTDIR) - @cp hw/cwav-usbeeax/build/*.fw $(DESTDIR) - @cp hw/cwav-usbeedx/build/*.fw $(DESTDIR) - @cp hw/cwav-usbeesx/build/*.fw $(DESTDIR) - @cp hw/cypress-fx2/build/*.fw $(DESTDIR) - @cp hw/braintechnology-usb-lps/build/*.fw $(DESTDIR) - -clean: - @rm -rf hw/saleae-logic/build - @rm -rf hw/cwav-usbeeax/build - @rm -rf hw/cwav-usbeedx/build - @rm -rf hw/cwav-usbeesx/build - @rm -rf hw/cypress-fx2/build - @rm -rf hw/braintechnology-usb-lps/build - @$(MAKE) -C fx2lib clean - -.PHONY: saleae-logic cwav-usbeeax cwav-usbeedx cwav-usbeesx cypress-fx2 braintechnology-usb-lps diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..b7341015 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,43 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +ACLOCAL_AMFLAGS = -I autostuff + +SUBDIRS = include fx2lib hw + +EXTRA_DIST = fx2lafw.c gpif-acquisition.c + +.PHONY: fx2lafw +fx2lafw: fx2lafw.rel gpif-acquisition.rel + +.c.rel: + $(AM_V_GEN)$(SDCC) -mmcs51 -I$(srcdir)/include -I${srcdir}/fx2lib/include -c $< -o $@ + +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog +ChangeLog: + $(AM_V_at)git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog + +dist-hook: ChangeLog + +clean-local: + $(AM_V_at)-rm -f *.asm *.lst *.rel *.rst *.sym + diff --git a/Makefile.include b/Makefile.include deleted file mode 100644 index 8038741a..00000000 --- a/Makefile.include +++ /dev/null @@ -1,35 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2011-2012 Uwe Hermann -## Copyright (C) 2012 Joel Holdsworth -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -OBJCOPY ?= objcopy -MAKEBIN ?= makebin -FX2LIBDIR ?= ../../fx2lib -BUILDDIR ?= build -SDCCFLAGS += -I../../include - -$(BUILDDIR)/$(BASENAME).fw: $(BUILDDIR)/$(BASENAME).ihx -ifneq ($(shell which objcopy 2>/dev/null),) - $(OBJCOPY) -Iihex $< -Obinary $@ -else - $(MAKEBIN) -p < $< > $@ -endif - -include $(FX2LIBDIR)/lib/fx2.mk diff --git a/README b/README index bd7fbfcf..ec58838a 100644 --- a/README +++ b/README @@ -24,11 +24,13 @@ tarball releases. Requirements ------------ - - In order to build fx2lafw you need the 'sdcc' compiler. + - In order to build fx2lafw you need the 'sdcc' compiler (>= 2.8.0). On Debian you can install it via: $ apt-get install sdcc + This project has been tested to work with sdcc 2.8, 2.9, and 3.x. + - You need libsigrok >= 0.1.1 in order to make use of fx2lafw. Earlier versions didn't have support for FX2 devices using this firmware. @@ -40,6 +42,8 @@ In order to get the sigrok-firmware-fx2lafw source code and build it, run: $ git clone git://sigrok.org/sigrok-firmware-fx2lafw $ cd sigrok-firmware-fx2lafw + $ ./autogen.sh + $ ./configure $ make For installing sigrok-firmware-fx2lafw: @@ -50,7 +54,7 @@ The generated *.fw files are installed into /usr/local/share/sigrok-firmware. You can override the install location like this: - $ make install DESTDIR=/usr/share/sigrok-firmware + $ ./configure --prefix=/usr Please see the following wiki pages for more detailed instructions: diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000..d39b7c1a --- /dev/null +++ b/autogen.sh @@ -0,0 +1,57 @@ +#!/bin/sh +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +OS=`uname` + +ACLOCAL_DIR= + +if [ "x$OS" = "xDarwin" ]; then + if [ -d /sw/share/aclocal ]; then + # fink installs aclocal macros here + ACLOCAL_DIR="-I /sw/share/aclocal" + elif [ -d /opt/local/share/aclocal ]; then + # Macports installs aclocal macros here + ACLOCAL_DIR="-I /opt/local/share/aclocal" + elif [ -d /usr/local/share/aclocal ]; then + # Homebrew installs aclocal macros here + ACLOCAL_DIR="-I /usr/local/share/aclocal" + elif [ -d /usr/share/aclocal ]; then + # Xcode installs aclocal macros here + ACLOCAL_DIR="-I /usr/share/aclocal" + fi +elif [ "x$OS" = "xMINGW32_NT-5.1" ]; then + # Windows XP + ACLOCAL_DIR="-I /usr/local/share/aclocal" +elif [ "x$OS" = "xMINGW32_NT-6.0" ]; then + # Windows Vista + ACLOCAL_DIR="-I /usr/local/share/aclocal" +elif [ "x$OS" = "xMINGW32_NT-6.1" ]; then + # Windows 7 + ACLOCAL_DIR="-I /usr/local/share/aclocal" +fi + +echo "Generating build system..." +mkdir -p autostuff +aclocal ${ACLOCAL_DIR} || exit 1 +autoheader || exit 1 +automake --add-missing --copy || exit 1 +autoconf || exit 1 + diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..41b657cf --- /dev/null +++ b/configure.ac @@ -0,0 +1,74 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +# We require at least autoconf 2.63 (AC_INIT format changed there). +AC_PREREQ([2.63]) + +AC_INIT([sigrok-firmware-fx2lafw], [0.1.0], + [sigrok-devel@lists.sourceforge.net], + [sigrok-firmware-fx2lafw], [http://www.sigrok.org]) +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_MACRO_DIR([autostuff]) +AC_CONFIG_AUX_DIR([autostuff]) + +# We require at least automake 1.11 (needed for 'silent rules'). +AM_INIT_AUTOMAKE([1.11 -Wall -Werror check-news]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +AC_PROG_INSTALL +AC_PROG_LN_S + +AC_CHECK_PROGS([SDCC], [sdcc]) +AC_CHECK_PROGS([SDCCLIB], [sdcclib]) +AC_CHECK_PROGS([OBJCOPY], [objcopy]) +AC_CHECK_PROGS([MAKEBIN], [makebin]) + +AM_CONDITIONAL([FOUND_OBJCOPY], [test "x$OBJCOPY" != "x"]) +AM_CONDITIONAL([FOUND_MAKEBIN], [test "x$MAKEBIN" != "x"]) +AM_COND_IF([FOUND_OBJCOPY], [AC_SUBST(FOUND_OBJCOPY, "yes")]) +AM_COND_IF([FOUND_MAKEBIN], [AC_SUBST(FOUND_MAKEBIN, "yes")]) + +# The sdcc 8051 assembler binary has/had different names: +# Newer sdcc, Debian / Ubuntu: sdas8051 +# Newer sdcc, Fedora: sdcc-sdas8051 +# Older sdcc: asx8051 +AC_CHECK_PROGS([SDAS8051], [sdas8051 sdcc-sdas8051 asx8051]) + +AC_SUBST(SDCC_FLAGS, "--code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl\"-b DSCR_AREA=0x3e00\" -Wl\"-b INT2JT=0x3f00\"") +AC_SUBST(FIRMWARE_DIR, "$datadir/sigrok-firmware") +AC_SUBST(MAKEFLAGS, '--no-print-directory') + +AC_CONFIG_FILES([Makefile + include/Makefile + fx2lib/Makefile + fx2lib/include/Makefile + fx2lib/lib/Makefile + fx2lib/lib/interrupts/Makefile + hw/Makefile + hw/braintechnology-usb-lps/Makefile + hw/cwav-usbeeax/Makefile + hw/cwav-usbeedx/Makefile + hw/cwav-usbeesx/Makefile + hw/cypress-fx2/Makefile + hw/saleae-logic/Makefile + ]) + +AC_OUTPUT + diff --git a/fx2lib/.gitignore b/fx2lib/.gitignore index a6cde122..da8c3602 100644 --- a/fx2lib/.gitignore +++ b/fx2lib/.gitignore @@ -1,17 +1,17 @@ -*.asm -*.rel -*.lst -*.sym -*.adb -*.cdb -*.ihx -*.bix -*.rst -*.mem -*.map -*.lnk -*.kpf -*.swp -*.iic -docs/html -build +# *.asm +# *.rel +# *.lst +# *.sym +# *.adb +# *.cdb +# *.ihx +# *.bix +# *.rst +# *.mem +# *.map +# *.lnk +# *.kpf +# *.swp +# *.iic +# docs/html +# build diff --git a/fx2lib/Makefile b/fx2lib/Makefile deleted file mode 100644 index 731b61d2..00000000 --- a/fx2lib/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - - -VER=devel -TAG=HEAD - -.PHONY: all docs - -all: - $(MAKE) -C lib - -docs: - doxygen docs/docs.conf - $(MAKE) -C docs/intro - -dist: all docs - mkdir -p build - git archive --prefix=fx2lib/ $(TAG) > build/fx2-$(VER).tar - tar -C .. -rf build/fx2-$(VER).tar \ - fx2lib/docs/html \ - fx2lib/lib/fx2.lib \ - fx2lib/docs/intro/intro.pdf - cat build/fx2-$(VER).tar | gzip > build/fx2-$(VER).tgz - -clean: - $(MAKE) -C lib clean diff --git a/fx2lib/Makefile.am b/fx2lib/Makefile.am new file mode 100644 index 00000000..dd2b5148 --- /dev/null +++ b/fx2lib/Makefile.am @@ -0,0 +1,22 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +SUBDIRS = include lib + diff --git a/fx2lib/include/Makefile.am b/fx2lib/include/Makefile.am new file mode 100644 index 00000000..0a1fbe21 --- /dev/null +++ b/fx2lib/include/Makefile.am @@ -0,0 +1,23 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +EXTRA_DIST = autovector.h delay.h eputils.h fx2ints.h fx2macros.h fx2regs.h \ + fx2types.h gpif.h i2c.h lights.h serial.h setupdat.h + diff --git a/fx2lib/lib/.gitignore b/fx2lib/lib/.gitignore deleted file mode 100644 index 08711daa..00000000 --- a/fx2lib/lib/.gitignore +++ /dev/null @@ -1 +0,0 @@ -fx2.lib diff --git a/fx2lib/lib/Makefile b/fx2lib/lib/Makefile deleted file mode 100644 index d497d2a0..00000000 --- a/fx2lib/lib/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) 2009 Ubixum, Inc. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -SOURCES = serial.c i2c.c delay.c setupdat.c gpif.c eputils.c $(wildcard interrupts/*.c) -FX2_OBJS = $(patsubst %.c,%.rel, $(SOURCES)) usbav.rel int4av.rel -INCLUDES = -I../include -SDCC = sdcc -mmcs51 $(SDCCFLAGS) -LIBS = fx2.lib - -# The sdcc 8051 assembler binary has/had different names. -ifneq ($(shell which sdas8051 2>/dev/null),) -# Newer sdcc, Debian / Ubuntu -SDAS8051 = sdas8051 -endif -ifneq ($(shell which sdcc-sdas8051 2>/dev/null),) -# Newer sdcc, Fedora -SDAS8051 = sdcc-sdas8051 -endif -ifneq ($(shell which asx8051 2>/dev/null),) -# Older sdcc -SDAS8051 = asx8051 -endif - -all: $(LIBS) - -$(LIBS): $(FX2_OBJS) - sdcclib fx2.lib $? - -usbav.rel: usbav.a51 - $(SDAS8051) -logs usbav.a51 - -int4av.rel: int4av.a51 - $(SDAS8051) -logs int4av.a51 - -%.rel: %.c - $(SDCC) $(INCLUDES) -c $< -o $@ - -clean: - rm -f *.asm *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym - rm -f *.adb *.cdb *.lib - rm -f interrupts/*.asm interrupts/*.ihx interrupts/*.lnk - rm -f interrupts/*.lst interrupts/*.map interrupts/*.mem - rm -f interrupts/*.rel interrupts/*.rst interrupts/*.sym - rm -f interrupts/*.adb interrupts/*.dcb interrupts/*.lib - diff --git a/fx2lib/lib/Makefile.am b/fx2lib/lib/Makefile.am new file mode 100644 index 00000000..beecbb3b --- /dev/null +++ b/fx2lib/lib/Makefile.am @@ -0,0 +1,51 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +SUBDIRS = interrupts + +SRC = delay.c eputils.c gpif.c i2c.c serial.c delay.c setupdat.c + +REL = delay.rel eputils.rel gpif.rel i2c.rel serial.rel delay.rel setupdat.rel + +EXTRA_DIST = $(SRC) int4av.a51 usbav.a51 + +all: fx2.lib + +fx2.lib: $(REL) int4av.rel usbav.rel + $(AM_V_GEN)$(SDCCLIB) fx2.lib $? + +usbav.rel: usbav.a51 + $(AM_V_at)if test "x${abs_top_srcdir}" != "x${abs_top_builddir}"; then \ + $(INSTALL_DATA) ${srcdir}/usbav.a51 ${builddir}; \ + fi + $(AM_V_GEN)$(SDAS8051) -logs -I${top_srcdir}/include usbav.a51 + +int4av.rel: int4av.a51 + $(AM_V_at)if test "x${abs_top_srcdir}" != "x${abs_top_builddir}"; then \ + $(INSTALL_DATA) ${srcdir}/int4av.a51 ${builddir}; \ + fi + $(AM_V_GEN)$(SDAS8051) -logs -I${top_srcdir}/include int4av.a51 + +.c.rel: + $(AM_V_GEN)$(SDCC) -mmcs51 -I${top_srcdir}/fx2lib/include -c $< -o $@ + +clean-local: + $(AM_V_at)-rm -f *.asm *.lst *.rel *.sym fx2.lib + diff --git a/fx2lib/lib/fx2.mk b/fx2lib/lib/fx2.mk deleted file mode 100644 index b001b932..00000000 --- a/fx2lib/lib/fx2.mk +++ /dev/null @@ -1,115 +0,0 @@ -# common make targets for compiling fx2 firmware -# -# In your Makefile, define: -# SOURCES: list of c files to compile -# A51_SOURCES: list of any a51 files. -# DEPS: list of any depedancies (like auto-generated header files) that need -# generated prior to compiling. You must provide the target definition -# for any DEPS you define. -# BASENAME: name of your firmware file, i.e., myfirmware, but not myfirmware.c -# -# Leave these alone or redefine as necessary to customize firmware. -# (Redefine after including this makefile) -# VID vendor id -# PID product id -# LIBS optional additional libraries to link with the firmware. -# SDCC build/link options -# CODE_SIZE: Default --code-size 0x3c00 -# XRAM_SIZE: Default --xram-size 0x0200 -# XRAM_LOC: Default --xram-loc 0x3c00 -# BUILDDIR: build directory (default build) -# These two can be changed to be blank if no device descriptor is being used. -# DSCR_AREA: Default -Wl"-b DSCR_AREA=0x3e00" -# INT2JT: Default -Wl"-b INT2JT=0x3f00" -# -# Provided targets: -# -# default target: creates $(BASENAME).ihx -# bix: creates $(BASENAME).bix -# iic: creates $(BASENAME).iic -# load: uses fx2load to load firmware.bix onto the development board -# (You can customize VID/PID if you need to load the firmware onto a device that has different vendor and product id -# The default is 0x04b4, 0x8613 -# clean: delete all the temp files. -# -# -# - -# The sdcc 8051 assembler binary has/had different names. -ifneq ($(shell which sdas8051 2>/dev/null),) -# Newer sdcc, Debian / Ubuntu -SDAS8051 = sdas8051 -endif -ifneq ($(shell which sdcc-sdas8051 2>/dev/null),) -# Newer sdcc, Fedora -SDAS8051 = sdcc-sdas8051 -endif -ifneq ($(shell which asx8051 2>/dev/null),) -# Older sdcc -SDAS8051 = asx8051 -endif - -VID?=0x04b4 -PID?=0x8613 - -DSCR_AREA?=-Wl"-b DSCR_AREA=0x3e00" -INT2JT?=-Wl"-b INT2JT=0x3f00" -CODE_SIZE?=--code-size 0x3c00 -XRAM_SIZE?=--xram-size 0x0200 -XRAM_LOC?=--xram-loc 0x3c00 -BUILDDIR?=build - -FX2LIBDIR?=$(dir $(lastword $(MAKEFILE_LIST)))../ - -RELS=$(addprefix $(BUILDDIR)/, $(addsuffix .rel, $(notdir $(basename $(SOURCES) $(A51_SOURCES))))) -# these are pretty good settings for most firmwares. -# Have to be careful with memory locations for -# firmwares that require more xram etc. -CC = sdcc -mmcs51 \ - $(SDCCFLAGS) \ - $(CODE_SIZE) \ - $(XRAM_SIZE) \ - $(XRAM_LOC) \ - $(DSCR_AREA) \ - $(INT2JT) - - -.PHONY: ihx iic bix load clean clean-all - - -ihx: $(BUILDDIR)/$(BASENAME).ihx -bix: $(BUILDDIR)/$(BASENAME).bix -iic: $(BUILDDIR)/$(BASENAME).iic - -$(FX2LIBDIR)/lib/fx2.lib: $(FX2LIBDIR)/lib/*.c $(FX2LIBDIR)/lib/*.a51 - $(MAKE) -C $(FX2LIBDIR)/lib - -$(BUILDDIR): - mkdir -p $(BUILDDIR) - -$(BUILDDIR)/$(BASENAME).ihx: $(BUILDDIR) $(SOURCES) $(A51_SOURCES) $(FX2LIBDIR)/lib/fx2.lib $(DEPS) -# can't use default target %.rel because there is no way -# to differentiate the dependency. (Is it %.rel: %.c or %.a51) - for a in $(A51_SOURCES); do \ - cp $$a $(BUILDDIR)/; \ - cd $(BUILDDIR) && $(SDAS8051) -logs `basename $$a` && cd ..; done - for s in $(SOURCES); do \ - THISREL=$$(basename `echo "$$s" | sed -e 's/\.c$$/\.rel/'`); \ - $(CC) -c -I $(FX2LIBDIR)/include $$s -o $(BUILDDIR)/$$THISREL ; done - $(CC) -o $@ $(RELS) fx2.lib -L $(FX2LIBDIR)/lib $(LIBS) - - -$(BUILDDIR)/$(BASENAME).bix: $(BUILDDIR)/$(BASENAME).ihx - objcopy -I ihex -O binary $< $@ -$(BUILDDIR)/$(BASENAME).iic: $(BUILDDIR)/$(BASENAME).ihx - $(FX2LIBDIR)/utils/ihx2iic.py -v $(VID) -p $(PID) $< $@ - -load: $(BUILDDIR)/$(BASENAME).bix - fx2load -v $(VID) -p $(PID) $(BUILDDIR)/$(BASENAME).bix - -clean: - rm -f $(BUILDDIR)/*.{asm,ihx,lnk,lst,map,mem,rel,rst,sym,adb,cdb,bix} - -clean-all: clean - $(MAKE) -C $(FX2LIBDIR)/lib clean - diff --git a/fx2lib/lib/interrupts/Makefile.am b/fx2lib/lib/interrupts/Makefile.am new file mode 100644 index 00000000..fff87718 --- /dev/null +++ b/fx2lib/lib/interrupts/Makefile.am @@ -0,0 +1,56 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +# No, we cannot use $(wildcard...) or $(patsubst...), both are non-portable. + +SRC = ep0ack_isr.c ep0in_isr.c ep0out_isr.c ep0ping_isr.c ep1in_isr.c \ + ep1out_isr.c ep1ping_isr.c ep2ef_isr.c ep2ff_isr.c ep2isoerr_isr.c \ + ep2_isr.c ep2pf_isr.c ep2ping_isr.c ep4ef_isr.c ep4ff_isr.c \ + ep4isoerr_isr.c ep4_isr.c ep4pf_isr.c ep4ping_isr.c ep6ef_isr.c \ + ep6ff_isr.c ep6isoerr_isr.c ep6_isr.c ep6pf_isr.c ep6ping_isr.c \ + ep8ef_isr.c ep8ff_isr.c ep8isoerr_isr.c ep8_isr.c ep8pf_isr.c \ + ep8ping_isr.c errlimit_isr.c gpifdone_isr.c gpifwf_isr.c hispeed_isr.c \ + ibn_isr.c sof_isr.c spare_isr.c sudav_isr.c suspend_isr.c sutok_isr.c \ + usbreset_isr.c + +REL = ep0ack_isr.rel ep0in_isr.rel ep0out_isr.rel ep0ping_isr.rel \ + ep1in_isr.rel ep1out_isr.rel ep1ping_isr.rel ep2ef_isr.rel \ + ep2ff_isr.rel ep2isoerr_isr.rel ep2_isr.rel ep2pf_isr.rel \ + ep2ping_isr.rel ep4ef_isr.rel ep4ff_isr.rel ep4isoerr_isr.rel \ + ep4_isr.rel ep4pf_isr.rel ep4ping_isr.rel ep6ef_isr.rel ep6ff_isr.rel \ + ep6isoerr_isr.rel ep6_isr.rel ep6pf_isr.rel ep6ping_isr.rel \ + ep8ef_isr.rel ep8ff_isr.rel ep8isoerr_isr.rel ep8_isr.rel ep8pf_isr.rel \ + ep8ping_isr.rel errlimit_isr.rel gpifdone_isr.rel gpifwf_isr.rel \ + hispeed_isr.rel ibn_isr.rel sof_isr.rel spare_isr.rel sudav_isr.rel \ + suspend_isr.rel sutok_isr.rel usbreset_isr.rel + +EXTRA_DIST = $(SRC) + +all-local: ints.lib + +ints.lib: $(REL) + $(AM_V_GEN)$(SDCCLIB) ints.lib $? + +.c.rel: + $(AM_V_GEN)$(SDCC) -mmcs51 -I${top_srcdir}/fx2lib/include -c $< -o $@ + +clean-local: + $(AM_V_at)-rm -f *.asm *.lst *.rel *.sym ints.lib + diff --git a/hw/Makefile.am b/hw/Makefile.am new file mode 100644 index 00000000..4a687485 --- /dev/null +++ b/hw/Makefile.am @@ -0,0 +1,27 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +SUBDIRS = braintechnology-usb-lps \ + cwav-usbeeax \ + cwav-usbeedx \ + cwav-usbeesx \ + cypress-fx2 \ + saleae-logic + diff --git a/hw/Makefile.inc b/hw/Makefile.inc new file mode 100644 index 00000000..2925f66e --- /dev/null +++ b/hw/Makefile.inc @@ -0,0 +1,58 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +EXTRA_DIST = dscr.a51 + +fx2lafw: + $(AM_V_at)cd ${top_builddir} && $(MAKE) fx2lafw + +if FOUND_OBJCOPY +$(BASENAME).fw: $(BASENAME).ihx + $(AM_V_GEN)$(OBJCOPY) -Iihex $(BASENAME).ihx -Obinary $@ +else +if FOUND_MAKEBIN +$(BASENAME).fw: $(BASENAME).ihx + $(AM_V_GEN)$(MAKEBIN) -p < $(BASENAME).ihx > $@ +endif +endif + +RELS = ${top_builddir}/fx2lafw.rel ${top_builddir}/gpif-acquisition.rel \ + ${builddir}/dscr.rel + +$(builddir)/dscr.rel: dscr.a51 + $(AM_V_at)if test "x${abs_top_srcdir}" != "x${abs_top_builddir}"; then \ + $(INSTALL_DATA) ${srcdir}/dscr.a51 ${builddir}; \ + fi + $(AM_V_GEN)$(SDAS8051) -logs -I${top_srcdir}/include dscr.a51 + +$(BASENAME).ihx: fx2lafw $(RELS) $(top_builddir)/fx2lib/lib/fx2.lib $(top_builddir)/fx2lib/lib/interrupts/ints.lib + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_FLAGS) -o $@ $(RELS) -L$(top_builddir)/fx2lib/lib fx2.lib interrupts/ints.lib + +install-data-local: $(BASENAME).fw + $(AM_V_at)$(MKDIR_P) $(FIRMWARE_DIR) + $(AM_V_at)$(INSTALL_DATA) $(BASENAME).fw $(FIRMWARE_DIR) + +uninstall-local: + $(AM_V_at)-rm -f $(FIRMWARE_DIR)/$(BASENAME).fw + +clean-local: + $(AM_V_at)-rm -f *.lst *.rel *.rst *.sym *.lnk *.map *.mem *.ihx *.fw + $(AM_V_at)-rm -f *.cdb *.lk *.omf + diff --git a/hw/braintechnology-usb-lps/Makefile b/hw/braintechnology-usb-lps/Makefile deleted file mode 100644 index bfc0aecc..00000000 --- a/hw/braintechnology-usb-lps/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2012 Uwe Hermann -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c -A51_SOURCES = dscr.a51 -BASENAME = fx2lafw-braintechnology-usb-lps - -include ../../Makefile.include diff --git a/hw/braintechnology-usb-lps/Makefile.am b/hw/braintechnology-usb-lps/Makefile.am new file mode 100644 index 00000000..6e30bbca --- /dev/null +++ b/hw/braintechnology-usb-lps/Makefile.am @@ -0,0 +1,26 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +BASENAME = fx2lafw-braintechnology-usb-lps + +all-local: $(BASENAME).fw + +include $(srcdir)/../Makefile.inc + diff --git a/hw/braintechnology-usb-lps/dscr.a51 b/hw/braintechnology-usb-lps/dscr.a51 index bae24066..2f720282 100644 --- a/hw/braintechnology-usb-lps/dscr.a51 +++ b/hw/braintechnology-usb-lps/dscr.a51 @@ -21,4 +21,4 @@ VID = 0xd016 ; Manufacturer ID (0x16d0) PID = 0x9804 ; Product ID (0x0498) -.include "../../../include/dscr.inc" +.include "dscr.inc" diff --git a/hw/cwav-usbeeax/Makefile b/hw/cwav-usbeeax/Makefile deleted file mode 100644 index 2159f607..00000000 --- a/hw/cwav-usbeeax/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2011-2012 Uwe Hermann -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c -A51_SOURCES = dscr.a51 -BASENAME = fx2lafw-cwav-usbeeax - -include ../../Makefile.include diff --git a/hw/cwav-usbeeax/Makefile.am b/hw/cwav-usbeeax/Makefile.am new file mode 100644 index 00000000..9d44aa84 --- /dev/null +++ b/hw/cwav-usbeeax/Makefile.am @@ -0,0 +1,26 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +BASENAME = fx2lafw-cwav-usbeeax + +all-local: $(BASENAME).fw + +include $(srcdir)/../Makefile.inc + diff --git a/hw/cwav-usbeeax/dscr.a51 b/hw/cwav-usbeeax/dscr.a51 index d49fcb0b..51753617 100644 --- a/hw/cwav-usbeeax/dscr.a51 +++ b/hw/cwav-usbeeax/dscr.a51 @@ -22,4 +22,4 @@ VID = 0xa908 ; Manufacturer ID (0x08a9) PID = 0x1400 ; Product ID (0x0014) -.include "../../../include/dscr.inc" +.include "dscr.inc" diff --git a/hw/cwav-usbeedx/Makefile b/hw/cwav-usbeedx/Makefile deleted file mode 100644 index 7cc0e9b5..00000000 --- a/hw/cwav-usbeedx/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2012 Ivan Fedorov -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c -A51_SOURCES = dscr.a51 -BASENAME = fx2lafw-cwav-usbeedx - -include ../../Makefile.include diff --git a/hw/cwav-usbeedx/Makefile.am b/hw/cwav-usbeedx/Makefile.am new file mode 100644 index 00000000..7d160698 --- /dev/null +++ b/hw/cwav-usbeedx/Makefile.am @@ -0,0 +1,26 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +BASENAME = fx2lafw-cwav-usbeedx + +all-local: $(BASENAME).fw + +include $(srcdir)/../Makefile.inc + diff --git a/hw/cwav-usbeedx/dscr.a51 b/hw/cwav-usbeedx/dscr.a51 index 4326fc08..2580b6fe 100644 --- a/hw/cwav-usbeedx/dscr.a51 +++ b/hw/cwav-usbeedx/dscr.a51 @@ -21,4 +21,4 @@ VID = 0xa908 ; Manufacturer ID (0x08a9) PID = 0x1500 ; Product ID (0x0015) -.include "../../../include/dscr.inc" +.include "dscr.inc" diff --git a/hw/cwav-usbeesx/Makefile b/hw/cwav-usbeesx/Makefile deleted file mode 100644 index 39128266..00000000 --- a/hw/cwav-usbeesx/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2011-2012 Uwe Hermann -## Copyright (C) 2012 Joel Holdsworth -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c -A51_SOURCES = dscr.a51 -BASENAME = fx2lafw-cwav-usbeesx - -include ../../Makefile.include diff --git a/hw/cwav-usbeesx/Makefile.am b/hw/cwav-usbeesx/Makefile.am new file mode 100644 index 00000000..dc458e0c --- /dev/null +++ b/hw/cwav-usbeesx/Makefile.am @@ -0,0 +1,26 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +BASENAME = fx2lafw-cwav-usbeesx + +all-local: $(BASENAME).fw + +include $(srcdir)/../Makefile.inc + diff --git a/hw/cwav-usbeesx/dscr.a51 b/hw/cwav-usbeesx/dscr.a51 index 42595639..1f75bb9c 100644 --- a/hw/cwav-usbeesx/dscr.a51 +++ b/hw/cwav-usbeesx/dscr.a51 @@ -22,4 +22,4 @@ VID = 0xa908 ; Manufacturer ID (0x08a9) PID = 0x0900 ; Product ID (0x0009) -.include "../../../include/dscr.inc" +.include "dscr.inc" diff --git a/hw/cypress-fx2/Makefile b/hw/cypress-fx2/Makefile deleted file mode 100644 index 78e2308c..00000000 --- a/hw/cypress-fx2/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2012 Joel Holdsworth -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c -A51_SOURCES = dscr.a51 -BASENAME = fx2lafw-cypress-fx2 - -include ../../Makefile.include diff --git a/hw/cypress-fx2/Makefile.am b/hw/cypress-fx2/Makefile.am new file mode 100644 index 00000000..13d6f2a2 --- /dev/null +++ b/hw/cypress-fx2/Makefile.am @@ -0,0 +1,26 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +BASENAME = fx2lafw-cypress-fx2 + +all-local: $(BASENAME).fw + +include $(srcdir)/../Makefile.inc + diff --git a/hw/cypress-fx2/dscr.a51 b/hw/cypress-fx2/dscr.a51 index a4a6e908..e7998c9f 100644 --- a/hw/cypress-fx2/dscr.a51 +++ b/hw/cypress-fx2/dscr.a51 @@ -22,4 +22,4 @@ VID = 0xb404 ; Manufacturer ID (0x04b4) PID = 0x1386 ; Product ID (0x8613) -.include "../../../include/dscr.inc" +.include "dscr.inc" diff --git a/hw/saleae-logic/Makefile b/hw/saleae-logic/Makefile deleted file mode 100644 index 340ab87b..00000000 --- a/hw/saleae-logic/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the fx2lafw project. -## -## Copyright (C) 2012 Uwe Hermann -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -SOURCES = ../../fx2lafw.c ../../gpif-acquisition.c -A51_SOURCES = dscr.a51 -BASENAME = fx2lafw-saleae-logic - -include ../../Makefile.include diff --git a/hw/saleae-logic/Makefile.am b/hw/saleae-logic/Makefile.am new file mode 100644 index 00000000..53a40f15 --- /dev/null +++ b/hw/saleae-logic/Makefile.am @@ -0,0 +1,26 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +BASENAME = fx2lafw-saleae-logic + +all-local: $(BASENAME).fw + +include $(srcdir)/../Makefile.inc + diff --git a/hw/saleae-logic/dscr.a51 b/hw/saleae-logic/dscr.a51 index cbef09e9..9fc525e4 100644 --- a/hw/saleae-logic/dscr.a51 +++ b/hw/saleae-logic/dscr.a51 @@ -22,4 +22,4 @@ VID = 0x2509 ; Manufacturer ID (0x0925) PID = 0x8138 ; Product ID (0x3881) -.include "../../../include/dscr.inc" +.include "dscr.inc" diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 00000000..cc086e3b --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,22 @@ +## +## This file is part of the fx2lafw project. +## +## Copyright (C) 2013 Uwe Hermann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +EXTRA_DIST = command.h dscr.inc fx2lafw.h gpif-acquisition.h +