move jtag drivers to src/jtag/drivers
authorZachary T Welch <zw@superlucidity.net>
Thu, 3 Dec 2009 01:18:05 +0000 (17:18 -0800)
committerZachary T Welch <zw@superlucidity.net>
Thu, 3 Dec 2009 07:27:09 +0000 (23:27 -0800)
Moves JTAG interface drivers to src/jtag/drivers/,
Adds src/jtag/drivers/Makefile.am.
Builds libocdjtagdrivers.la.

Flattens the rlink driver files into the drivers/ directory, adding
the 'rlink_' prefix or '.rlink' suffix as appropriate.

31 files changed:
configure.in
src/jtag/Makefile.am
src/jtag/drivers/Makefile.am [new file with mode: 0644]
src/jtag/drivers/Makefile.rlink [moved from src/jtag/rlink/Makefile with 100% similarity]
src/jtag/drivers/amt_jtagaccel.c [moved from src/jtag/amt_jtagaccel.c with 100% similarity]
src/jtag/drivers/arm-jtag-ew.c [moved from src/jtag/arm-jtag-ew.c with 100% similarity]
src/jtag/drivers/at91rm9200.c [moved from src/jtag/at91rm9200.c with 100% similarity]
src/jtag/drivers/bitbang.c [moved from src/jtag/bitbang.c with 100% similarity]
src/jtag/drivers/bitbang.h [moved from src/jtag/bitbang.h with 100% similarity]
src/jtag/drivers/bitq.c [moved from src/jtag/bitq.c with 100% similarity]
src/jtag/drivers/bitq.h [moved from src/jtag/bitq.h with 100% similarity]
src/jtag/drivers/driver.c [moved from src/jtag/driver.c with 100% similarity]
src/jtag/drivers/dummy.c [moved from src/jtag/dummy.c with 100% similarity]
src/jtag/drivers/ep93xx.c [moved from src/jtag/ep93xx.c with 100% similarity]
src/jtag/drivers/ft2232.c [moved from src/jtag/ft2232.c with 100% similarity]
src/jtag/drivers/gw16012.c [moved from src/jtag/gw16012.c with 100% similarity]
src/jtag/drivers/jlink.c [moved from src/jtag/jlink.c with 100% similarity]
src/jtag/drivers/parport.c [moved from src/jtag/parport.c with 100% similarity]
src/jtag/drivers/presto.c [moved from src/jtag/presto.c with 100% similarity]
src/jtag/drivers/rlink.c [moved from src/jtag/rlink/rlink.c with 99% similarity]
src/jtag/drivers/rlink.h [moved from src/jtag/rlink/rlink.h with 100% similarity]
src/jtag/drivers/rlink_call.m4 [moved from src/jtag/rlink/call.m4 with 100% similarity]
src/jtag/drivers/rlink_dtc_cmd.h [moved from src/jtag/rlink/dtc_cmd.h with 100% similarity]
src/jtag/drivers/rlink_ep1_cmd.h [moved from src/jtag/rlink/ep1_cmd.h with 100% similarity]
src/jtag/drivers/rlink_init.m4 [moved from src/jtag/rlink/init.m4 with 100% similarity]
src/jtag/drivers/rlink_speed_table.c [moved from src/jtag/rlink/rlink_speed_table.c with 99% similarity]
src/jtag/drivers/rlink_st7.h [moved from src/jtag/rlink/st7.h with 100% similarity]
src/jtag/drivers/usb_common.c [moved from src/jtag/usb_common.c with 100% similarity]
src/jtag/drivers/usb_common.h [moved from src/jtag/usb_common.h with 100% similarity]
src/jtag/drivers/usbprog.c [moved from src/jtag/usbprog.c with 100% similarity]
src/jtag/drivers/vsllink.c [moved from src/jtag/vsllink.c with 100% similarity]

index 7b2b4af..5020ed6 100644 (file)
@@ -1117,6 +1117,7 @@ AC_OUTPUT(dnl
     src/Makefile dnl
     src/helper/Makefile dnl
     src/jtag/Makefile dnl
+    src/jtag/drivers/Makefile dnl
     src/xsvf/Makefile dnl
     src/svf/Makefile dnl
     src/target/Makefile dnl
index 5254a2b..c735897 100644 (file)
@@ -5,7 +5,9 @@ AM_CPPFLAGS = \
 METASOURCES = AUTO
 noinst_LTLIBRARIES = libjtag.la
 
+SUBDIRS =
 DRIVERFILES =
+libjtag_la_LIBADD =
 
 if MINIDRIVER
 
@@ -20,63 +22,14 @@ endif
 
 else
 
-# Standard Driver: common files
-DRIVERFILES += driver.c commands.c
+DRIVERFILES += commands.c
 
-if USB
-DRIVERFILES += usb_common.c
-endif
-
-if BITBANG
-DRIVERFILES += bitbang.c
-endif
-if PARPORT
-DRIVERFILES += parport.c
-endif
-if DUMMY
-DRIVERFILES += dummy.c
-endif
-if FT2232_DRIVER
-DRIVERFILES += ft2232.c
-endif
-if AMTJTAGACCEL
-DRIVERFILES += amt_jtagaccel.c
-endif
-if EP93XX
-DRIVERFILES += ep93xx.c
-endif
-if AT91RM9200
-DRIVERFILES += at91rm9200.c
-endif
-if GW16012
-DRIVERFILES += gw16012.c
-endif
-if BITQ
-DRIVERFILES += bitq.c
-endif
-if PRESTO_DRIVER
-DRIVERFILES += presto.c
-endif
-if USBPROG
-DRIVERFILES += usbprog.c
-endif
-if JLINK
-DRIVERFILES += jlink.c
-endif
-if RLINK
-DRIVERFILES += rlink/rlink.c rlink/rlink_speed_table.c
-endif
-if VSLLINK
-DRIVERFILES += vsllink.c
-endif
-if ARMJTAGEW
-DRIVERFILES += arm-jtag-ew.c
-endif
+SUBDIRS += drivers
+libjtag_la_LIBADD += $(top_builddir)/src/jtag/drivers/libocdjtagdrivers.la
 
 endif
 # endif // MINIDRIVER
 
-
 libjtag_la_SOURCES = \
        core.c \
        interface.c \
@@ -85,19 +38,12 @@ libjtag_la_SOURCES = \
        $(DRIVERFILES)
 
 noinst_HEADERS = \
+       commands.h \
        interface.h \
        interfaces.h \
-       commands.h \
        minidriver.h \
-       bitbang.h \
        jtag.h \
-       bitq.h \
-       rlink/dtc_cmd.h \
-       rlink/ep1_cmd.h \
-       rlink/rlink.h \
-       rlink/st7.h \
-       minidummy/jtag_minidriver.h \
-       usb_common.h
+       minidummy/jtag_minidriver.h
 
 EXTRA_DIST = startup.tcl
 
diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am
new file mode 100644 (file)
index 0000000..0a007b4
--- /dev/null
@@ -0,0 +1,74 @@
+AM_CPPFLAGS = \
+       -I$(top_srcdir)/src/helper \
+       -I$(top_srcdir)/src/jtag
+
+noinst_LTLIBRARIES = libocdjtagdrivers.la
+
+libocdjtagdrivers_la_SOURCES = \
+       $(DRIVERFILES)
+
+DRIVERFILES =
+
+# Standard Driver: common files
+DRIVERFILES += driver.c
+
+if USB
+DRIVERFILES += usb_common.c
+endif
+
+if BITBANG
+DRIVERFILES += bitbang.c
+endif
+if PARPORT
+DRIVERFILES += parport.c
+endif
+if DUMMY
+DRIVERFILES += dummy.c
+endif
+if FT2232_DRIVER
+DRIVERFILES += ft2232.c
+endif
+if AMTJTAGACCEL
+DRIVERFILES += amt_jtagaccel.c
+endif
+if EP93XX
+DRIVERFILES += ep93xx.c
+endif
+if AT91RM9200
+DRIVERFILES += at91rm9200.c
+endif
+if GW16012
+DRIVERFILES += gw16012.c
+endif
+if BITQ
+DRIVERFILES += bitq.c
+endif
+if PRESTO_DRIVER
+DRIVERFILES += presto.c
+endif
+if USBPROG
+DRIVERFILES += usbprog.c
+endif
+if JLINK
+DRIVERFILES += jlink.c
+endif
+if RLINK
+DRIVERFILES += rlink.c rlink_speed_table.c
+endif
+if VSLLINK
+DRIVERFILES += vsllink.c
+endif
+if ARMJTAGEW
+DRIVERFILES += arm-jtag-ew.c
+endif
+
+noinst_HEADERS = \
+       bitbang.h \
+       bitq.h \
+       rlink.h \
+       rlink_dtc_cmd.h \
+       rlink_ep1_cmd.h \
+       rlink_st7.h \
+       usb_common.h
+
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
similarity index 100%
rename from src/jtag/bitq.c
rename to src/jtag/drivers/bitq.c
similarity index 100%
rename from src/jtag/bitq.h
rename to src/jtag/drivers/bitq.h
similarity index 100%
rename from src/jtag/driver.c
rename to src/jtag/drivers/driver.c
similarity index 100%
rename from src/jtag/dummy.c
rename to src/jtag/drivers/dummy.c
similarity index 100%
rename from src/jtag/ep93xx.c
rename to src/jtag/drivers/ep93xx.c
similarity index 100%
rename from src/jtag/ft2232.c
rename to src/jtag/drivers/ft2232.c
similarity index 100%
rename from src/jtag/jlink.c
rename to src/jtag/drivers/jlink.c
similarity index 100%
rename from src/jtag/presto.c
rename to src/jtag/drivers/presto.c
similarity index 99%
rename from src/jtag/rlink/rlink.c
rename to src/jtag/drivers/rlink.c
index bb33ad8..a039080 100644 (file)
@@ -31,9 +31,9 @@
 #include "interface.h"
 #include "commands.h"
 #include "rlink.h"
-#include "st7.h"
-#include "ep1_cmd.h"
-#include "dtc_cmd.h"
+#include "rlink_st7.h"
+#include "rlink_ep1_cmd.h"
+#include "rlink_dtc_cmd.h"
 #include "usb_common.h"
 
 
similarity index 99%
rename from src/jtag/rlink/rlink_speed_table.c
rename to src/jtag/drivers/rlink_speed_table.c
index 2ef62ee..fa40fe8 100644 (file)
@@ -4,7 +4,7 @@
 #endif
 
 #include "rlink.h"
-#include "st7.h"
+#include "rlink_st7.h"
 
 static const uint8_t dtc_64[] = {
        0, 2, 68, 84, 67, 2, 13, 160, 176, 151, 147, 182, 141, 152, 177, 129, 148,