summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2011-06-13 15:42:46 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-06-13 15:51:04 +0200
commitc8b57198025c414f8d19577e6846021843c2a751 (patch)
treef87ac8b526f05625e4c1b3401542de78aed0c3c1 /src
parent1b0862c189f8db70f65e0eeabb749580d71e0e97 (diff)
downloadopenocd_libswd-c8b57198025c414f8d19577e6846021843c2a751.tar.gz
openocd_libswd-c8b57198025c414f8d19577e6846021843c2a751.tar.bz2
openocd_libswd-c8b57198025c414f8d19577e6846021843c2a751.tar.xz
openocd_libswd-c8b57198025c414f8d19577e6846021843c2a751.zip
transport: move files over to transport folder
as we introduce swd and jtag as two transports, we want to start up with a new transport folder to organize the code a bit.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/jtag/Makefile.am2
-rw-r--r--src/jtag/adapter.c2
-rw-r--r--src/jtag/core.c2
-rw-r--r--src/jtag/drivers/ft2232.c2
-rw-r--r--src/openocd.c2
-rw-r--r--src/target/adi_v5_swd.c2
-rw-r--r--src/transport/Makefile.am11
-rw-r--r--src/transport/transport.c (renamed from src/jtag/transport.c)2
-rw-r--r--src/transport/transport.h (renamed from src/jtag/transport.h)6
10 files changed, 25 insertions, 8 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3d7b05f6..60d1189b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,6 +4,7 @@ SUBDIRS = \
jtag \
helper \
target \
+ transport \
flash \
svf \
xsvf \
@@ -98,6 +99,7 @@ libopenocd_la_LIBADD = \
$(top_builddir)/src/svf/libsvf.la \
$(top_builddir)/src/pld/libpld.la \
$(top_builddir)/src/jtag/libjtag.la \
+ $(top_builddir)/src/transport/libtransport.la \
$(top_builddir)/src/flash/libflash.la \
$(top_builddir)/src/target/libtarget.la \
$(top_builddir)/src/server/libserver.la \
diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am
index fa964a35..2717dc54 100644
--- a/src/jtag/Makefile.am
+++ b/src/jtag/Makefile.am
@@ -56,7 +56,6 @@ libjtag_la_SOURCES = \
interface.c \
interfaces.c \
tcl.c \
- transport.c \
$(DRIVERFILES)
noinst_HEADERS = \
@@ -66,7 +65,6 @@ noinst_HEADERS = \
interfaces.h \
minidriver.h \
jtag.h \
- transport.h \
minidriver/minidriver_imp.h \
minidummy/jtag_minidriver.h
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index e16f756e..94843d7d 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -35,7 +35,7 @@
#include "minidriver.h"
#include "interface.h"
#include "interfaces.h"
-#include "transport.h"
+#include <transport/transport.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 22d0b8c3..b26701e3 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -33,7 +33,7 @@
#include "jtag.h"
#include "interface.h"
-#include "transport.h"
+#include <transport/transport.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index bde17005..38ead566 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -81,7 +81,7 @@
/* project specific includes */
#include <jtag/interface.h>
-#include <jtag/transport.h>
+#include <transport/transport.h>
#include <helper/time_support.h>
#if IS_CYGWIN == 1
diff --git a/src/openocd.c b/src/openocd.c
index a5002d19..57676f52 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -31,7 +31,7 @@
#include "openocd.h"
#include <jtag/driver.h>
#include <jtag/jtag.h>
-#include <jtag/transport.h>
+#include <transport/transport.h>
#include <helper/ioutil.h>
#include <helper/util.h>
#include <helper/configuration.h>
diff --git a/src/target/adi_v5_swd.c b/src/target/adi_v5_swd.c
index 39f38572..5a3570d5 100644
--- a/src/target/adi_v5_swd.c
+++ b/src/target/adi_v5_swd.c
@@ -50,7 +50,7 @@
#include "arm_adi_v5.h"
#include <helper/time_support.h>
-#include <jtag/transport.h>
+#include <transport/transport.h>
#include <jtag/interface.h>
#include <jtag/swd.h>
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
new file mode 100644
index 00000000..7c6224a4
--- /dev/null
+++ b/src/transport/Makefile.am
@@ -0,0 +1,11 @@
+include $(top_srcdir)/common.mk
+
+#METASOURCES = AUTO
+noinst_LTLIBRARIES = libtransport.la
+libtransport_la_SOURCES = \
+ transport.c
+
+noinst_HEADERS = \
+ transport.h
+
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
diff --git a/src/jtag/transport.c b/src/transport/transport.c
index 60228803..b5e4b900 100644
--- a/src/jtag/transport.c
+++ b/src/transport/transport.c
@@ -44,7 +44,7 @@
#include <helper/log.h>
-#include "transport.h"
+#include <transport/transport.h>
extern struct command_context *global_cmd_ctx;
diff --git a/src/jtag/transport.h b/src/transport/transport.h
index d2d38ec2..6ece39e5 100644
--- a/src/jtag/transport.h
+++ b/src/transport/transport.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2010 by David Brownell
+ * Copyright (C) 2011 Tomasz Boleslaw CEDRO (http://www.tomek.cedro.info)
*
* 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
@@ -16,6 +17,9 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef TRANSPORT_H
+#define TRANSPORT_H
+
#include "helper/command.h"
/**
@@ -78,3 +82,5 @@ COMMAND_HELPER(transport_list_parse, char ***vector);
int allow_transports(struct command_context *ctx, const char **vector);
bool transports_are_declared(void);
+
+#endif