From: Daniel Elstner Date: Sat, 7 Nov 2015 18:02:43 +0000 (+0100) Subject: build: Switch to non-recursive make X-Git-Tag: sigrok-firmware-fx2lafw-0.1.3~9 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=88d4ba3e4b3c0b8587b2a338a0bf09640d1edb7e;p=sigrok-firmware-fx2lafw.git build: Switch to non-recursive make --- diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..9fc0f8d4 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2 @@ +The ChangeLog is auto-generated when releasing. If you +are seeing this, use 'git log' for a detailed list of changes. diff --git a/Makefile.am b/Makefile.am index 8aecbb1c..19f4388e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ ## This file is part of the sigrok-firmware-fx2lafw project. ## ## Copyright (C) 2013 Uwe Hermann +## Copyright (C) 2015 Daniel Elstner ## ## 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 @@ -18,37 +19,301 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -ACLOCAL_AMFLAGS = -I autostuff +GNUMAKEFLAGS = --no-print-directory +SUFFIXES = .a51 .c .fw .ihx .rel -SUBDIRS = include fx2lib hw +# Flags for firmware hex file generation +SDCC_LINK_FLAGS = --code-size 0x1c00 --xram-size 0x0200 --xram-loc 0x1c00 -Wl"-b DSCR_AREA=0x1e00" -Wl"-b INT2JT=0x1f00" -EXTRA_DIST = fx2lafw.c gpif-acquisition.c +# Include paths +as_includes = -I$(srcdir)/include +c_includes = -I$(srcdir)/include -I$(srcdir)/fx2lib/include -.PHONY: fx2lafw -fx2lafw: fx2lafw.rel gpif-acquisition.rel +# Binary firmware tarball basename +distdir_bin = $(PACKAGE)-bin-$(VERSION) -.c.rel: - $(AM_V_GEN)$(SDCC) -mmcs51 -I$(srcdir)/include -I${srcdir}/fx2lib/include -c $< -o $@ +# Basename of directory stamp files +dirstamp = .dirstamp + +dirstamps = \ + fx2lib/lib/$(dirstamp) \ + fx2lib/lib/interrupts/$(dirstamp) \ + hw/braintechnology-usb-lps/$(dirstamp) \ + hw/cwav-usbeeax/$(dirstamp) \ + hw/cwav-usbeedx/$(dirstamp) \ + hw/cwav-usbeesx/$(dirstamp) \ + hw/cypress-fx2/$(dirstamp) \ + hw/saleae-logic/$(dirstamp) \ + hw/sigrok-fx2-8ch/$(dirstamp) \ + hw/sigrok-fx2-16ch/$(dirstamp) + +# Final firmware files +firmware_binaries = \ + hw/braintechnology-usb-lps/fx2lafw-braintechnology-usb-lps.fw \ + hw/cwav-usbeeax/fx2lafw-cwav-usbeeax.fw \ + hw/cwav-usbeedx/fx2lafw-cwav-usbeedx.fw \ + hw/cwav-usbeesx/fx2lafw-cwav-usbeesx.fw \ + hw/cypress-fx2/fx2lafw-cypress-fx2.fw \ + hw/saleae-logic/fx2lafw-saleae-logic.fw \ + hw/sigrok-fx2-8ch/fx2lafw-sigrok-fx2-8ch.fw \ + hw/sigrok-fx2-16ch/fx2lafw-sigrok-fx2-16ch.fw + +fx2lafw_headers = \ + include/command.h \ + include/dscr.inc \ + include/fx2lafw.h \ + include/gpif-acquisition.h + +fx2lafw_sources = \ + fx2lafw.c \ + gpif-acquisition.c + +fx2lafw_objects = \ + fx2lafw.rel \ + gpif-acquisition.rel + +fx2lib_headers = \ + fx2lib/include/autovector.h \ + fx2lib/include/delay.h \ + fx2lib/include/eputils.h \ + fx2lib/include/fx2ints.h \ + fx2lib/include/fx2macros.h \ + fx2lib/include/fx2regs.h \ + fx2lib/include/fx2types.h \ + fx2lib/include/gpif.h \ + fx2lib/include/i2c.h \ + fx2lib/include/lights.h \ + fx2lib/include/serial.h \ + fx2lib/include/setupdat.h + +fx2lib_sources = \ + fx2lib/lib/delay.c \ + fx2lib/lib/eputils.c \ + fx2lib/lib/gpif.c \ + fx2lib/lib/i2c.c \ + fx2lib/lib/int4av.a51 \ + fx2lib/lib/serial.c \ + fx2lib/lib/delay.c \ + fx2lib/lib/setupdat.c \ + fx2lib/lib/usbav.a51 + +fx2lib_objects = \ + fx2lib/lib/delay.rel \ + fx2lib/lib/eputils.rel \ + fx2lib/lib/gpif.rel \ + fx2lib/lib/i2c.rel \ + fx2lib/lib/int4av.rel \ + fx2lib/lib/serial.rel \ + fx2lib/lib/delay.rel \ + fx2lib/lib/setupdat.rel \ + fx2lib/lib/usbav.rel + +fx2lib_ints_sources = \ + fx2lib/lib/interrupts/ep0ack_isr.c \ + fx2lib/lib/interrupts/ep0in_isr.c \ + fx2lib/lib/interrupts/ep0out_isr.c \ + fx2lib/lib/interrupts/ep0ping_isr.c \ + fx2lib/lib/interrupts/ep1in_isr.c \ + fx2lib/lib/interrupts/ep1out_isr.c \ + fx2lib/lib/interrupts/ep1ping_isr.c \ + fx2lib/lib/interrupts/ep2ef_isr.c \ + fx2lib/lib/interrupts/ep2ff_isr.c \ + fx2lib/lib/interrupts/ep2isoerr_isr.c \ + fx2lib/lib/interrupts/ep2_isr.c \ + fx2lib/lib/interrupts/ep2pf_isr.c \ + fx2lib/lib/interrupts/ep2ping_isr.c \ + fx2lib/lib/interrupts/ep4ef_isr.c \ + fx2lib/lib/interrupts/ep4ff_isr.c \ + fx2lib/lib/interrupts/ep4isoerr_isr.c \ + fx2lib/lib/interrupts/ep4_isr.c \ + fx2lib/lib/interrupts/ep4pf_isr.c \ + fx2lib/lib/interrupts/ep4ping_isr.c \ + fx2lib/lib/interrupts/ep6ef_isr.c \ + fx2lib/lib/interrupts/ep6ff_isr.c \ + fx2lib/lib/interrupts/ep6isoerr_isr.c \ + fx2lib/lib/interrupts/ep6_isr.c \ + fx2lib/lib/interrupts/ep6pf_isr.c \ + fx2lib/lib/interrupts/ep6ping_isr.c \ + fx2lib/lib/interrupts/ep8ef_isr.c \ + fx2lib/lib/interrupts/ep8ff_isr.c \ + fx2lib/lib/interrupts/ep8isoerr_isr.c \ + fx2lib/lib/interrupts/ep8_isr.c \ + fx2lib/lib/interrupts/ep8pf_isr.c \ + fx2lib/lib/interrupts/ep8ping_isr.c \ + fx2lib/lib/interrupts/errlimit_isr.c \ + fx2lib/lib/interrupts/gpifdone_isr.c \ + fx2lib/lib/interrupts/gpifwf_isr.c \ + fx2lib/lib/interrupts/hispeed_isr.c \ + fx2lib/lib/interrupts/ibn_isr.c \ + fx2lib/lib/interrupts/sof_isr.c \ + fx2lib/lib/interrupts/spare_isr.c \ + fx2lib/lib/interrupts/sudav_isr.c \ + fx2lib/lib/interrupts/suspend_isr.c \ + fx2lib/lib/interrupts/sutok_isr.c \ + fx2lib/lib/interrupts/usbreset_isr.c + +fx2lib_ints_objects = \ + fx2lib/lib/interrupts/ep0ack_isr.rel \ + fx2lib/lib/interrupts/ep0in_isr.rel \ + fx2lib/lib/interrupts/ep0out_isr.rel \ + fx2lib/lib/interrupts/ep0ping_isr.rel \ + fx2lib/lib/interrupts/ep1in_isr.rel \ + fx2lib/lib/interrupts/ep1out_isr.rel \ + fx2lib/lib/interrupts/ep1ping_isr.rel \ + fx2lib/lib/interrupts/ep2ef_isr.rel \ + fx2lib/lib/interrupts/ep2ff_isr.rel \ + fx2lib/lib/interrupts/ep2isoerr_isr.rel \ + fx2lib/lib/interrupts/ep2_isr.rel \ + fx2lib/lib/interrupts/ep2pf_isr.rel \ + fx2lib/lib/interrupts/ep2ping_isr.rel \ + fx2lib/lib/interrupts/ep4ef_isr.rel \ + fx2lib/lib/interrupts/ep4ff_isr.rel \ + fx2lib/lib/interrupts/ep4isoerr_isr.rel \ + fx2lib/lib/interrupts/ep4_isr.rel \ + fx2lib/lib/interrupts/ep4pf_isr.rel \ + fx2lib/lib/interrupts/ep4ping_isr.rel \ + fx2lib/lib/interrupts/ep6ef_isr.rel \ + fx2lib/lib/interrupts/ep6ff_isr.rel \ + fx2lib/lib/interrupts/ep6isoerr_isr.rel \ + fx2lib/lib/interrupts/ep6_isr.rel \ + fx2lib/lib/interrupts/ep6pf_isr.rel \ + fx2lib/lib/interrupts/ep6ping_isr.rel \ + fx2lib/lib/interrupts/ep8ef_isr.rel \ + fx2lib/lib/interrupts/ep8ff_isr.rel \ + fx2lib/lib/interrupts/ep8isoerr_isr.rel \ + fx2lib/lib/interrupts/ep8_isr.rel \ + fx2lib/lib/interrupts/ep8pf_isr.rel \ + fx2lib/lib/interrupts/ep8ping_isr.rel \ + fx2lib/lib/interrupts/errlimit_isr.rel \ + fx2lib/lib/interrupts/gpifdone_isr.rel \ + fx2lib/lib/interrupts/gpifwf_isr.rel \ + fx2lib/lib/interrupts/hispeed_isr.rel \ + fx2lib/lib/interrupts/ibn_isr.rel \ + fx2lib/lib/interrupts/sof_isr.rel \ + fx2lib/lib/interrupts/spare_isr.rel \ + fx2lib/lib/interrupts/sudav_isr.rel \ + fx2lib/lib/interrupts/suspend_isr.rel \ + fx2lib/lib/interrupts/sutok_isr.rel \ + fx2lib/lib/interrupts/usbreset_isr.rel + +fx2lib_libs = \ + fx2lib/lib/fx2.lib \ + fx2lib/lib/interrupts/ints.lib + +hw_sources = \ + hw/braintechnology-usb-lps/dscr.a51 \ + hw/cwav-usbeeax/dscr.a51 \ + hw/cwav-usbeedx/dscr.a51 \ + hw/cwav-usbeesx/dscr.a51 \ + hw/cypress-fx2/dscr.a51 \ + hw/saleae-logic/dscr.a51 \ + hw/sigrok-fx2-8ch/dscr.a51 \ + hw/sigrok-fx2-16ch/dscr.a51 + +firmwaredir = $(datadir)/sigrok-firmware +firmware_DATA = $(firmware_binaries) + +dist_noinst_DATA = $(fx2lafw_headers) $(fx2lafw_sources) $(fx2lib_headers) $(fx2lib_sources) $(fx2lib_ints_sources) $(hw_sources) + +MOSTLYCLEANFILES = *.asm fx2lib/lib/*.asm fx2lib/lib/*.lib fx2lib/lib/interrupts/*.asm fx2lib/lib/interrupts/*.lib +CLEANFILES = $(firmware_binaries) +DISTCLEANFILES = $(dirstamps) + +.PHONY: dist-bin dist-changelog + +all-local: $(firmware_binaries) -MAINTAINERCLEANFILES = ChangeLog +mostlyclean-local: + -$(AM_V_at)find . -type f '(' -name '*.ihx' -o -name '*.lk' \ + -o -name '*.lst' -o -name '*.map' -o -name '*.mem' \ + -o -name '*.rel' -o -name '*.rst' -o -name '*.sym' ')' \ + -exec rm -f '{}' '+' -.PHONY: ChangeLog -ChangeLog: - $(AM_V_at)git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog +dist-hook: dist-changelog -dist-hook: ChangeLog +dist-changelog: + $(AM_V_at)if test ! -d '$(top_srcdir)/.git'; then \ + cp -f '$(top_srcdir)/ChangeLog' "$(top_distdir)/ChangeLog"; \ + elif git -C '$(top_srcdir)' log >.ChangeLog.tmp; then \ + mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ + else \ + rm -f .ChangeLog.tmp; exit 1; \ + fi # Creates a convenience tarball with just the generated *.fw files, so that # the users don't have to build them manually. -TARBALL=$(PACKAGE)-bin-$(VERSION) -distbin: all ChangeLog - $(AM_V_at)$(MKDIR_P) $(TARBALL) - $(AM_V_at)$(INSTALL_DATA) hw/*/*.fw $(TARBALL) - $(AM_V_at)$(INSTALL_DATA) README NEWS ChangeLog COPYING* $(TARBALL) - $(AM_V_at)tar -c -z -f $(TARBALL).tar.gz $(TARBALL) - $(AM_V_at)-rm -rf $(TARBALL) - $(AM_V_at)-rm -f ChangeLog - -clean-local: - $(AM_V_at)-rm -f *.asm *.lst *.rel *.rst *.sym +dist-bin: $(firmware_binaries) + $(AM_V_at)$(MKDIR_P) $(distdir_bin) + $(AM_V_at)$(INSTALL_DATA) $(firmware_binaries) $(distdir_bin) + $(AM_V_at)$(INSTALL_DATA) $(srcdir)/COPYING $(srcdir)/COPYING.LESSER $(srcdir)/NEWS $(srcdir)/README $(distdir_bin) + $(AM_V_at)git -C '$(top_srcdir)' log > $(distdir_bin)/ChangeLog + $(AM_V_at)tar -czf $(distdir_bin).tar.gz $(distdir_bin) + -$(AM_V_at)rm -fr $(distdir_bin) + +# List dependencies +$(fx2lafw_objects): $(fx2lafw_headers) +$(fx2lib_objects): fx2lib/lib/$(dirstamp) $(fx2lib_headers) +$(fx2lib_ints_objects): fx2lib/lib/interrupts/$(dirstamp) $(fx2lib_headers) + +hw/braintechnology-usb-lps/dscr.rel: hw/braintechnology-usb-lps/$(dirstamp) include/dscr.inc +hw/cwav-usbeeax/dscr.rel: hw/cwav-usbeeax/$(dirstamp) include/dscr.inc +hw/cwav-usbeedx/dscr.rel: hw/cwav-usbeedx/$(dirstamp) include/dscr.inc +hw/cwav-usbeesx/dscr.rel: hw/cwav-usbeesx/$(dirstamp) include/dscr.inc +hw/cypress-fx2/dscr.rel: hw/cypress-fx2/$(dirstamp) include/dscr.inc +hw/saleae-logic/dscr.rel: hw/saleae-logic/$(dirstamp) include/dscr.inc +hw/sigrok-fx2-8ch/dscr.rel: hw/sigrok-fx2-8ch/$(dirstamp) include/dscr.inc +hw/sigrok-fx2-16ch/dscr.rel: hw/sigrok-fx2-16ch/$(dirstamp) include/dscr.inc + +# Create build subdirectories +$(dirstamps): + @stamp='$@'; $(MKDIR_P) "$${stamp%/*}" + @: > $@ + +fx2lib/lib/fx2.lib: $(fx2lib_objects) + -$(AM_V_at)rm -f $@ + $(AM_V_GEN)$(SDCCLIB) $@ $(fx2lib_objects) + +fx2lib/lib/interrupts/ints.lib: $(fx2lib_ints_objects) + -$(AM_V_at)rm -f $@ + $(AM_V_GEN)$(SDCCLIB) $@ $(fx2lib_ints_objects) + +hw/braintechnology-usb-lps/fx2lafw-braintechnology-usb-lps.ihx: hw/braintechnology-usb-lps/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/braintechnology-usb-lps/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +hw/cwav-usbeeax/fx2lafw-cwav-usbeeax.ihx: hw/cwav-usbeeax/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeeax/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +hw/cwav-usbeedx/fx2lafw-cwav-usbeedx.ihx: hw/cwav-usbeedx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeedx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +hw/cwav-usbeesx/fx2lafw-cwav-usbeesx.ihx: hw/cwav-usbeesx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeesx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +hw/cypress-fx2/fx2lafw-cypress-fx2.ihx: hw/cypress-fx2/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cypress-fx2/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +hw/saleae-logic/fx2lafw-saleae-logic.ihx: hw/saleae-logic/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/saleae-logic/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +hw/sigrok-fx2-8ch/fx2lafw-sigrok-fx2-8ch.ihx: hw/sigrok-fx2-8ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/sigrok-fx2-8ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +hw/sigrok-fx2-16ch/fx2lafw-sigrok-fx2-16ch.ihx: hw/sigrok-fx2-16ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + $(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/sigrok-fx2-16ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs) + +.a51.rel: + $(AM_V_GEN)$(SDAS8051) -glos $(as_includes) $@ $< + +.c.rel: + $(AM_V_GEN)$(SDCC) -mmcs51 $(c_includes) -c $< -o $@ + +if FOUND_OBJCOPY +.ihx.fw: + $(AM_V_GEN)$(OBJCOPY) -Iihex $< -Obinary $@ +else +if FOUND_MAKEBIN +.ihx.fw: + $(AM_V_GEN)$(MAKEBIN) -p < $< > $@ +endif +endif diff --git a/autogen.sh b/autogen.sh index 4e403305..69e0767c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e ## ## This file is part of the sigrok-firmware-fx2lafw project. ## @@ -19,28 +19,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -OS=`uname` - -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 -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 +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. +autoreconf --force --install --verbose "$srcdir" diff --git a/configure.ac b/configure.ac index d460b6b7..0a925976 100644 --- a/configure.ac +++ b/configure.ac @@ -24,66 +24,41 @@ AC_PREREQ([2.63]) AC_INIT([sigrok-firmware-fx2lafw], [0.1.2], [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])]) +AM_INIT_AUTOMAKE([1.11 -Wall -Werror no-define subdir-objects check-news]) +AM_SILENT_RULES([yes]) AC_PROG_INSTALL AC_PROG_LN_S # On Fedora, all sdcc tools have an 'sdcc-' prefix in the filename. AC_CHECK_PROGS([SDCC], [sdcc sdcc-sdcc]) -if test "x$SDCC" == "x"; then - AC_MSG_ERROR([cannot find sdcc.]) -fi +AS_IF([test "x$SDCC" = x], + [AC_MSG_ERROR([cannot find sdcc.])]) + AC_CHECK_PROGS([SDCCLIB], [sdcclib sdcc-sdcclib]) -if test "x$SDCCLIB" == "x"; then - AC_MSG_ERROR([cannot find sdcclib.]) -fi +AS_IF([test "x$SDCCLIB" = x], + [AC_MSG_ERROR([cannot find sdcclib.])]) + AC_CHECK_PROGS([OBJCOPY], [objcopy]) AC_CHECK_PROGS([MAKEBIN], [makebin sdcc-makebin]) -if test "x$OBJCOPY" == "x" && test "x$MAKEBIN" == "x"; then - AC_MSG_ERROR([cannot find objcopy or makebin.]) -fi +AS_IF([test "x$OBJCOPY$MAKEBIN" = x], + [AC_MSG_ERROR([cannot find objcopy or 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")]) +AM_CONDITIONAL([FOUND_OBJCOPY], [test "x$OBJCOPY" != x]) +AM_CONDITIONAL([FOUND_MAKEBIN], [test "x$MAKEBIN" != x]) # 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]) -if test "x$SDAS8051" == "x"; then - AC_MSG_ERROR([cannot find sdas8051.]) -fi - -AC_SUBST(SDCC_FLAGS, "--code-size 0x1c00 --xram-size 0x0200 --xram-loc 0x1c00 -Wl\"-b DSCR_AREA=0x1e00\" -Wl\"-b INT2JT=0x1f00\"") -AC_SUBST(FIRMWARE_DIR, "$datadir/sigrok-firmware") -AC_SUBST(MAKEFLAGS, '--no-print-directory') +AS_IF([test "x$SDAS8051" = x], + [AC_MSG_ERROR([cannot find sdas8051.])]) -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 - hw/sigrok-fx2-8ch/Makefile - hw/sigrok-fx2-16ch/Makefile - ]) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/fx2lib/Makefile.am b/fx2lib/Makefile.am deleted file mode 100644 index 4b24ceea..00000000 --- a/fx2lib/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -## -## This file is part of the sigrok-firmware-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 deleted file mode 100644 index 636b534b..00000000 --- a/fx2lib/include/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -## -## This file is part of the sigrok-firmware-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/Makefile.am b/fx2lib/lib/Makefile.am deleted file mode 100644 index 110a6a43..00000000 --- a/fx2lib/lib/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -## -## This file is part of the sigrok-firmware-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/interrupts/Makefile.am b/fx2lib/lib/interrupts/Makefile.am deleted file mode 100644 index 4160d1e5..00000000 --- a/fx2lib/lib/interrupts/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -## -## This file is part of the sigrok-firmware-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 deleted file mode 100644 index de678b09..00000000 --- a/hw/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -## -## This file is part of the sigrok-firmware-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 \ - sigrok-fx2-8ch \ - sigrok-fx2-16ch - diff --git a/hw/Makefile.inc b/hw/Makefile.inc deleted file mode 100644 index f832a6fb..00000000 --- a/hw/Makefile.inc +++ /dev/null @@ -1,60 +0,0 @@ -## -## This file is part of the sigrok-firmware-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 - -$(RELS): fx2lafw - -$(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) $(DESTDIR)$(FIRMWARE_DIR) - $(AM_V_at)$(INSTALL_DATA) $(BASENAME).fw $(DESTDIR)$(FIRMWARE_DIR) - -uninstall-local: - $(AM_V_at)-rm -f $(DESTDIR)$(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.am b/hw/braintechnology-usb-lps/Makefile.am deleted file mode 100644 index a1f3f400..00000000 --- a/hw/braintechnology-usb-lps/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-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/cwav-usbeeax/Makefile.am b/hw/cwav-usbeeax/Makefile.am deleted file mode 100644 index 32d0f403..00000000 --- a/hw/cwav-usbeeax/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-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-usbeedx/Makefile.am b/hw/cwav-usbeedx/Makefile.am deleted file mode 100644 index b1354c7b..00000000 --- a/hw/cwav-usbeedx/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-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-usbeesx/Makefile.am b/hw/cwav-usbeesx/Makefile.am deleted file mode 100644 index 6c70d93e..00000000 --- a/hw/cwav-usbeesx/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-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/cypress-fx2/Makefile.am b/hw/cypress-fx2/Makefile.am deleted file mode 100644 index 7fefdf83..00000000 --- a/hw/cypress-fx2/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-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/saleae-logic/Makefile.am b/hw/saleae-logic/Makefile.am deleted file mode 100644 index f0a459eb..00000000 --- a/hw/saleae-logic/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-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/sigrok-fx2-16ch/Makefile.am b/hw/sigrok-fx2-16ch/Makefile.am deleted file mode 100644 index 799f19e9..00000000 --- a/hw/sigrok-fx2-16ch/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-fx2lafw project. -## -## Copyright (C) 2015 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-sigrok-fx2-16ch - -all-local: $(BASENAME).fw - -include $(srcdir)/../Makefile.inc - diff --git a/hw/sigrok-fx2-8ch/Makefile.am b/hw/sigrok-fx2-8ch/Makefile.am deleted file mode 100644 index 6a3ce9da..00000000 --- a/hw/sigrok-fx2-8ch/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the sigrok-firmware-fx2lafw project. -## -## Copyright (C) 2015 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-sigrok-fx2-8ch - -all-local: $(BASENAME).fw - -include $(srcdir)/../Makefile.inc - diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index 6586598e..00000000 --- a/include/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -## -## This file is part of the sigrok-firmware-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 -