conditional build of SVF and BSDL components based on --enable-svf and --enable-bsdl

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@908 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent 5ef9f852e5
commit a763de935e

@ -1,5 +1,10 @@
2007-12-30 Arnim Laeuger <arniml@users.sourceforge.net>
* src/detect.c (detect_parts): call bsdl_scan_file() if configure result indicates inclusion of BSDL subsystem
* src/cmd/cmd.c: include cmd_svf and cmd_bsdl based on configure result
* src/Makefile.am (jtag_DEPENDENCIES): link to libsvf.a and libbsdl.a based on configure result
* src/cmd/Makefile.am (libcmd_a_SOURCES): compile svf.c and bsdl.c based on configure result
* configure.ac: added --enable-svf and --enable-bsdl
* README.svf: contents moved to doc/UrJTAG.txt, file deleted
* data/Makefile.am (nobase_dist_pkgdata_DATA): fixed merge results
* many files: integration of BSDL parser

@ -305,6 +305,40 @@ AS_IF([test "x$ep9307" = xtrue], [
CFLAGS="$CFLAGS -Wall"
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/include"
dnl Disable SVF player?
AC_ARG_ENABLE(svf,
[ --enable-svf Enable SVF player (default is enabled)],
[case "${enableval}" in
yes) svf=true ;;
no) svf=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-svf) ;;
esac],
[svf=true])
AS_IF([test "x$svf" = xtrue], [
AM_CONDITIONAL(ENABLE_SVF, true)
AC_DEFINE(ENABLE_SVF, 1, [define if SVF player is enabled])
],[
AM_CONDITIONAL(ENABLE_SVF, false)
])
dnl Disable BSDL subsystem?
AC_ARG_ENABLE(bsdl,
[ --enable-bsdl Enable BSDL subsystem (default is enabled)],
[case "${enableval}" in
yes) bsdl=true ;;
no) bsdl=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-bsdl) ;;
esac],
[bsdl=true])
AS_IF([test "x$bsdl" = xtrue], [
AM_CONDITIONAL(ENABLE_BSDL, true)
AC_DEFINE(ENABLE_BSDL, 1, [define if BSDL subsystem is enabled])
],[
AM_CONDITIONAL(ENABLE_BSDL, false)
])
AC_OUTPUT
dnl
@ -325,12 +359,24 @@ if test ${HAVELIBFTD2XX:-no} != no ; then
else
FLAG_HAVELIBFTD2XX=no
fi
if test ${svf:-false} != false ; then
FLAG_SVF=yes
else
FLAG_SVF=no
fi
if test ${bsdl:-false} != false ; then
FLAG_BSDL=yes
else
FLAG_BSDL=no
fi
AC_MSG_RESULT([
jtag is now configured for
USB cable support : $FLAG_HAVELIBUSB
USB cable support : $FLAG_HAVELIBUSB
FTDI cable support
via libftdi : $FLAG_HAVELIBFTDI
via libftd2xx : $FLAG_HAVELIBFTD2XX
Parser error locations : $modern_flex ($LEX $flex_version)
via libftdi : $FLAG_HAVELIBFTDI
via libftd2xx : $FLAG_HAVELIBFTD2XX
SVF error locations : $modern_flex ($LEX $flex_version)
Build SVF player : $FLAG_SVF
Build BSDL subsystem : $FLAG_BSDL
])

@ -28,9 +28,15 @@ SUBDIRS = \
tap \
part \
bus \
cmd \
svf \
bsdl
cmd
if ENABLE_SVF
SUBDIRS += svf
endif
if ENABLE_BSDL
SUBDIRS += bsdl
endif
bin_PROGRAMS = \
jtag \
@ -53,9 +59,15 @@ jtag_DEPENDENCIES = \
tap/libtap.a \
part/libpart.a \
bus/libbus.a \
cmd/libcmd.a \
svf/libsvf.a \
bsdl/libbsdl.a
cmd/libcmd.a
if ENABLE_SVF
jtag_DEPENDENCIES += svf/libsvf.a
endif
if ENABLE_BSDL
jtag_DEPENDENCIES += bsdl/libbsdl.a
endif
jtag_LDADD = \
-Ltap -ltap \
@ -65,11 +77,17 @@ jtag_LDADD = \
-Lcmd -lcmd \
-L../libbrux -lbrux \
-Lbus -lbus \
-Lsvf -lsvf \
-Lbsdl -lbsdl \
-lm \
@FTD2XXLIB@ \
@LIBINTL@
if ENABLE_SVF
jtag_LDADD += -Lsvf -lsvf
endif
if ENABLE_BSDL
jtag_LDADD += -Lbsdl -lbsdl
endif
localedir = $(datadir)/locale
INCLUDES = -DLOCALEDIR=\"$(localedir)\"

@ -55,8 +55,14 @@ libcmd_a_SOURCES = \
eraseflash.c \
script.c \
include.c \
cmd.c \
svf.c \
bsdl.c
cmd.c
if ENABLE_SVF
libcmd_a_SOURCES += svf.c
endif
if ENABLE_BSDL
libcmd_a_SOURCES += bsdl.c
endif
INCLUDES = -DJTAG_DATA_DIR=\"$(pkgdatadir)\"

@ -63,8 +63,12 @@ extern cmd_t cmd_flashmem;
extern cmd_t cmd_eraseflash;
extern cmd_t cmd_script;
extern cmd_t cmd_include;
#ifdef ENABLE_SVF
extern cmd_t cmd_svf;
#endif
#ifdef ENABLE_BSDL
extern cmd_t cmd_bsdl;
#endif
extern cmd_t cmd_debug;
const cmd_t *cmds[] = {
@ -100,8 +104,12 @@ const cmd_t *cmds[] = {
&cmd_eraseflash,
&cmd_script,
&cmd_include,
#ifdef ENABLE_SVF
&cmd_svf,
#endif
#ifdef ENABLE_BSDL
&cmd_bsdl,
#endif
&cmd_debug,
NULL /* last must be NULL */
};

@ -276,7 +276,9 @@ detect_parts( chain_t *chain, char *db_path )
chain->active_part = ps->len - 1;
#ifdef ENABLE_BSDL
if (bsdl_scan_files(register_get_string( did ), 1) <= 0) {
#endif
/* find JTAG declarations for a part with id */
@ -363,7 +365,9 @@ detect_parts( chain_t *chain, char *db_path )
strcpy( part->part, partname );
strcpy( part->stepping, stepping );
cmd_run( cmd );
#ifdef ENABLE_BSDL
}
#endif
if (part->active_instruction == NULL)
part->active_instruction = part_find_instruction( part, "IDCODE" );

Loading…
Cancel
Save