diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 8fa49ba8..c9cb42c2 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,4 +1,8 @@ -2009-04-23 Rutger Hofman +2009-05-01 Rutger Hofman + Global variables for liburjtag should not reside in the shell app + * src/jtag.c: split into src/global/urjtag.c and src/apps/jtag/jtag.c + +2009-05-01 Rutger Hofman Move all include/* to include/urjtag/* to lower collision chance on #include. Start lifting commands from cmd/ into the library modules. Begun work on: diff --git a/urjtag/src/Makefile.am b/urjtag/src/Makefile.am index b7b43ca0..5f3e8ba0 100644 --- a/urjtag/src/Makefile.am +++ b/urjtag/src/Makefile.am @@ -29,7 +29,9 @@ SUBDIRS = \ tap \ part \ bus \ - cmd + cmd \ + global \ + apps/jtag if ENABLE_SVF SUBDIRS += svf @@ -43,15 +45,9 @@ if ENABLE_JIM SUBDIRS += jim endif -bin_PROGRAMS = \ - jtag - dist_bin_SCRIPTS = \ bsdl2jtag -jtag_SOURCES = \ - jtag.c - lib_LTLIBRARIES = liburjtag.la liburjtag_la_LDFLAGS = -version-info 0:0:0 @@ -64,6 +60,7 @@ liburjtag_la_LIBADD = \ flash/libflash.la \ bus/libbus.la \ cmd/libcmd.la \ + global/libglobal.la \ -lm \ @FTD2XXLIB@ \ @LIBINTL@ @@ -80,13 +77,5 @@ if ENABLE_JIM liburjtag_la_LIBADD += jim/libjim.la endif -if DMALLOC -liburjtag_la_LIBADD += -ldmalloc -endif - -jtag_LDADD = \ - liburjtag.la \ - @LIBINTL@ - localedir = $(datadir)/locale INCLUDES = -DLOCALEDIR=\"$(localedir)\" diff --git a/urjtag/src/apps/jtag/Makefile.am b/urjtag/src/apps/jtag/Makefile.am new file mode 100644 index 00000000..6da29ef5 --- /dev/null +++ b/urjtag/src/apps/jtag/Makefile.am @@ -0,0 +1,37 @@ +# +# $Id: Makefile.am 1531 2009-04-24 15:28:59Z rfhh $ +# +# Copyright (C) 2002 ETC s.r.o. +# +# 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# Written by Marcel Telka , 2002. +# + +include $(top_srcdir)/Makefile.rules + +bin_PROGRAMS = \ + jtag + +jtag_SOURCES = \ + jtag.c + +jtag_LDADD = \ + $(top_srcdir)/src/liburjtag.la \ + @LIBINTL@ + +localedir = $(datadir)/locale +INCLUDES = -DLOCALEDIR=\"$(localedir)\" diff --git a/urjtag/src/jtag.c b/urjtag/src/apps/jtag/jtag.c similarity index 99% rename from urjtag/src/jtag.c rename to urjtag/src/apps/jtag/jtag.c index c091d139..ec92e9cf 100644 --- a/urjtag/src/jtag.c +++ b/urjtag/src/apps/jtag/jtag.c @@ -56,9 +56,6 @@ ssize_t urj_lib_getline (char **lineptr, size_t *n, FILE * stream); #endif -urj_error_state_t urj_error_state; -int urj_debug_mode = 0; -int urj_big_endian = 0; static int urj_interactive = 0; #define JTAGDIR ".jtag" diff --git a/urjtag/src/global/Makefile.am b/urjtag/src/global/Makefile.am new file mode 100644 index 00000000..e9e31377 --- /dev/null +++ b/urjtag/src/global/Makefile.am @@ -0,0 +1,29 @@ +# +# $Id: Makefile.am 1531 2009-04-24 15:28:59Z rfhh $ +# +# Copyright (C) 2003 ETC s.r.o. +# +# 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# Written by Marcel Telka , 2003. +# + +include $(top_srcdir)/Makefile.rules + +noinst_LTLIBRARIES = libglobal.la + +libglobal_la_SOURCES = \ + urjtag.c diff --git a/urjtag/src/global/urjtag.c b/urjtag/src/global/urjtag.c new file mode 100644 index 00000000..ab685240 --- /dev/null +++ b/urjtag/src/global/urjtag.c @@ -0,0 +1,31 @@ +/* + * $Id: urjtag.c 1539 2009-05-01 12:02:08Z rfhh $ + * + * Copyright (C) 2009 Rutger Hofman, VU Amsterdam + * + * 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., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Written by Rutger Hofman + */ + +#include "sysdep.h" + +#include +#include + +urj_error_state_t urj_error_state; +int urj_debug_mode = 0; +int urj_big_endian = 0;