]> sigrok.org Git - sigrok-firmware-fx2lafw.git/commitdiff
Use a standard autotools setup.
authorUwe Hermann <redacted>
Wed, 9 Jan 2013 18:34:06 +0000 (19:34 +0100)
committerUwe Hermann <redacted>
Fri, 22 Feb 2013 07:53:00 +0000 (08:53 +0100)
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.

38 files changed:
.gitignore
AUTHORS [new file with mode: 0644]
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
Makefile.include [deleted file]
README
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
fx2lib/.gitignore
fx2lib/Makefile [deleted file]
fx2lib/Makefile.am [new file with mode: 0644]
fx2lib/include/Makefile.am [new file with mode: 0644]
fx2lib/lib/.gitignore [deleted file]
fx2lib/lib/Makefile [deleted file]
fx2lib/lib/Makefile.am [new file with mode: 0644]
fx2lib/lib/fx2.mk [deleted file]
fx2lib/lib/interrupts/Makefile.am [new file with mode: 0644]
hw/Makefile.am [new file with mode: 0644]
hw/Makefile.inc [new file with mode: 0644]
hw/braintechnology-usb-lps/Makefile [deleted file]
hw/braintechnology-usb-lps/Makefile.am [new file with mode: 0644]
hw/braintechnology-usb-lps/dscr.a51
hw/cwav-usbeeax/Makefile [deleted file]
hw/cwav-usbeeax/Makefile.am [new file with mode: 0644]
hw/cwav-usbeeax/dscr.a51
hw/cwav-usbeedx/Makefile [deleted file]
hw/cwav-usbeedx/Makefile.am [new file with mode: 0644]
hw/cwav-usbeedx/dscr.a51
hw/cwav-usbeesx/Makefile [deleted file]
hw/cwav-usbeesx/Makefile.am [new file with mode: 0644]
hw/cwav-usbeesx/dscr.a51
hw/cypress-fx2/Makefile [deleted file]
hw/cypress-fx2/Makefile.am [new file with mode: 0644]
hw/cypress-fx2/dscr.a51
hw/saleae-logic/Makefile [deleted file]
hw/saleae-logic/Makefile.am [new file with mode: 0644]
hw/saleae-logic/dscr.a51
include/Makefile.am [new file with mode: 0644]

index a8b39e3e993880cb84c931512a1c2f059cb4c627..522b68ae5d6d7a57e3c4d23cdd9c3a1fc9cf33fc 100644 (file)
@@ -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
 *.asm
-*.bix
-*.cdb
 *.ihx
 *.ihx
-*.iic
-*.kpf
 *.lnk
 *.lst
 *.map
 *.mem
 *.rel
 *.rst
 *.lnk
 *.lst
 *.map
 *.mem
 *.rel
 *.rst
-*.swp
 *.sym
 *.sym
-
-/hw/*/build/
+*.lib
+*.fw
+*.cdb
+*.lk
+*.omf
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..28c1b20
--- /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 (file)
index fc8d4c1..0000000
--- a/Makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## 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 (file)
index 0000000..b734101
--- /dev/null
@@ -0,0 +1,43 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index 8038741..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2011-2012 Uwe Hermann <uwe@hermann-uwe.de>
-## Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
-##
-## 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 bd7fbfcf4fadf23aed551f9779fe7d410f1dc589..ec58838a2ea8df5a0e059257f30a6aa1c2b49708 100644 (file)
--- a/README
+++ b/README
@@ -24,11 +24,13 @@ tarball releases.
 Requirements
 ------------
 
 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
 
    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.
 
  - 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
 
  $ git clone git://sigrok.org/sigrok-firmware-fx2lafw
  $ cd sigrok-firmware-fx2lafw
+ $ ./autogen.sh
+ $ ./configure
  $ make
 
 For installing sigrok-firmware-fx2lafw:
  $ 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:
 
 
 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:
 
 
 Please see the following wiki pages for more detailed instructions:
 
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..d39b7c1
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index 0000000..41b657c
--- /dev/null
@@ -0,0 +1,74 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+
index a6cde1224f7a95f92bf2632f6b34a604c658f98e..da8c360268b599c54808997a95552ad8be81e579 100644 (file)
@@ -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 (file)
index 731b61d..0000000
+++ /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 (file)
index 0000000..dd2b514
--- /dev/null
@@ -0,0 +1,22 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index 0000000..0a1fbe2
--- /dev/null
@@ -0,0 +1,23 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index 08711da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-fx2.lib
diff --git a/fx2lib/lib/Makefile b/fx2lib/lib/Makefile
deleted file mode 100644 (file)
index d497d2a..0000000
+++ /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 (file)
index 0000000..beecbb3
--- /dev/null
@@ -0,0 +1,51 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index b001b93..0000000
+++ /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 (file)
index 0000000..fff8771
--- /dev/null
@@ -0,0 +1,56 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index 0000000..4a68748
--- /dev/null
@@ -0,0 +1,27 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index 0000000..2925f66
--- /dev/null
@@ -0,0 +1,58 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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 (file)
index bfc0aec..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## 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 (file)
index 0000000..6e30bbc
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+
index bae24066b9549829002b8fa2756d8d4320c5cb11..2f720282c5c396f13b93b93234cce6b56e8ebe81 100644 (file)
@@ -21,4 +21,4 @@
 VID = 0xd016   ; Manufacturer ID (0x16d0)
 PID = 0x9804   ; Product ID (0x0498)
 
 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 (file)
index 2159f60..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2011-2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## 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 (file)
index 0000000..9d44aa8
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+
index d49fcb0bf617847678ee5ac74d6155cecf78395a..517536176aa77c09a26cd74c6de0a6622d052c42 100644 (file)
@@ -22,4 +22,4 @@
 VID = 0xa908   ; Manufacturer ID (0x08a9)
 PID = 0x1400   ; Product ID (0x0014)
 
 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 (file)
index 7cc0e9b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2012 Ivan Fedorov <oxyum@oxyum.ru>
-##
-## 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 (file)
index 0000000..7d16069
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+
index 4326fc08bd595aec959c01ff0e5138172bdff202..2580b6fe8b90c4d138cb22d8430569f30317b758 100644 (file)
@@ -21,4 +21,4 @@
 VID = 0xa908   ; Manufacturer ID (0x08a9)
 PID = 0x1500   ; Product ID (0x0015)
 
 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 (file)
index 3912826..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2011-2012 Uwe Hermann <uwe@hermann-uwe.de>
-## Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
-##
-## 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 (file)
index 0000000..dc458e0
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+
index 425956397bb801a44fb7660464fec7cc3568b50d..1f75bb9cbc8e64288d64d4f3b7a3c401a295309e 100644 (file)
@@ -22,4 +22,4 @@
 VID = 0xa908   ; Manufacturer ID (0x08a9)
 PID = 0x0900   ; Product ID (0x0009)
 
 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 (file)
index 78e2308..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
-##
-## 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 (file)
index 0000000..13d6f2a
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+
index a4a6e908336fd30420f2e1778b811578190988fd..e7998c9ff0ce49321455907d10a5d8a47f1d5266 100644 (file)
@@ -22,4 +22,4 @@
 VID = 0xb404   ; Manufacturer ID (0x04b4)
 PID = 0x1386   ; Product ID (0x8613)
 
 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 (file)
index 340ab87..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## This file is part of the fx2lafw project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## 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 (file)
index 0000000..53a40f1
--- /dev/null
@@ -0,0 +1,26 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+
index cbef09e93ce9d3b426d53c08e0bbab1161baa7da..9fc525e458838a14c42bec87c8fb08c70f384667 100644 (file)
@@ -22,4 +22,4 @@
 VID = 0x2509   ; Manufacturer ID (0x0925)
 PID = 0x8138   ; Product ID (0x3881)
 
 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 (file)
index 0000000..cc086e3
--- /dev/null
@@ -0,0 +1,22 @@
+##
+## This file is part of the fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## 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
+