summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-16 00:35:24 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-16 00:35:24 -0800
commitb695cb75220100cd9bbfaec5bd1740958454130d (patch)
tree6308a8f1358e96fd4d88c3241b0b24b63f64aaf5 /src
parent8193f17c3aeb948ca8f70ed3361e8b2bccefffed (diff)
downloadopenocd_libswd-b695cb75220100cd9bbfaec5bd1740958454130d.tar.gz
openocd_libswd-b695cb75220100cd9bbfaec5bd1740958454130d.tar.bz2
openocd_libswd-b695cb75220100cd9bbfaec5bd1740958454130d.tar.xz
openocd_libswd-b695cb75220100cd9bbfaec5bd1740958454130d.zip
#include "target.h" less wildly
Don't include "target.h" from more headers than necessary. This avoids needless interdependencies and duplicated include paths. Don't needlessly include it in source files, either. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/ecosboard.c1
-rw-r--r--src/flash/at91sam3.c1
-rw-r--r--src/flash/lpc3180_nand_controller.h2
-rw-r--r--src/flash/mflash.c1
-rw-r--r--src/flash/mflash.h2
-rw-r--r--src/openocd.c1
-rw-r--r--src/server/gdb_server.c2
-rw-r--r--src/server/gdb_server.h2
-rw-r--r--src/target/arm_adi_v5.h1
-rw-r--r--src/target/armv4_5_mmu.c1
-rw-r--r--src/target/armv4_5_mmu.h3
-rw-r--r--src/target/armv7a.c1
-rw-r--r--src/target/armv7a.h1
-rw-r--r--src/target/armv7m.c1
-rw-r--r--src/target/cortex_a8.h1
-rw-r--r--src/target/target_request.c1
-rw-r--r--src/target/target_request.h3
17 files changed, 10 insertions, 15 deletions
diff --git a/src/ecosboard.c b/src/ecosboard.c
index 95d41cb6..0cbba3e0 100644
--- a/src/ecosboard.c
+++ b/src/ecosboard.c
@@ -26,7 +26,6 @@
#include "configuration.h"
#include "xsvf.h"
#include "svf.h"
-#include "target.h"
#include "nand.h"
#include "pld.h"
diff --git a/src/flash/at91sam3.c b/src/flash/at91sam3.c
index 0f2be3c1..4507888f 100644
--- a/src/flash/at91sam3.c
+++ b/src/flash/at91sam3.c
@@ -62,7 +62,6 @@
#include <stddef.h>
#include "types.h"
#include "flash.h"
-#include "target.h"
#include "membuf.h"
#include "at91sam3.h"
#include "time_support.h"
diff --git a/src/flash/lpc3180_nand_controller.h b/src/flash/lpc3180_nand_controller.h
index b965be98..0891cedf 100644
--- a/src/flash/lpc3180_nand_controller.h
+++ b/src/flash/lpc3180_nand_controller.h
@@ -20,8 +20,6 @@
#ifndef LPC3180_NAND_CONTROLLER_H
#define LPC3180_NAND_CONTROLLER_H
-#include "target.h"
-
enum lpc3180_selected_controller
{
LPC3180_NO_CONTROLLER,
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index c2d04ca4..49dc432f 100644
--- a/src/flash/mflash.c
+++ b/src/flash/mflash.c
@@ -22,6 +22,7 @@
#endif
#include "mflash.h"
+#include "target.h"
#include "time_support.h"
#include "fileio.h"
#include "log.h"
diff --git a/src/flash/mflash.h b/src/flash/mflash.h
index ed4a2cdd..358d2536 100644
--- a/src/flash/mflash.h
+++ b/src/flash/mflash.h
@@ -20,7 +20,7 @@
#ifndef _MFLASH_H
#define _MFLASH_H
-#include "target.h"
+struct command_context;
typedef unsigned long mg_io_uint32;
typedef unsigned short mg_io_uint16;
diff --git a/src/openocd.c b/src/openocd.c
index e35a0ae5..4c075118 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -32,7 +32,6 @@
#include "configuration.h"
#include "xsvf.h"
#include "svf.h"
-#include "target.h"
#include "nand.h"
#include "pld.h"
#include "mflash.h"
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 21db2965..f6b44cd2 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -27,12 +27,12 @@
#include "config.h"
#endif
-#include "gdb_server.h"
#include "breakpoints.h"
#include "target_request.h"
#include "register.h"
#include "server.h"
#include "flash.h"
+#include "gdb_server.h"
#include "image.h"
#include "jtag.h"
diff --git a/src/server/gdb_server.h b/src/server/gdb_server.h
index 4513e8a0..a8e8dadb 100644
--- a/src/server/gdb_server.h
+++ b/src/server/gdb_server.h
@@ -26,8 +26,6 @@
#ifndef GDB_SERVER_H
#define GDB_SERVER_H
-#include "target.h"
-
struct image;
#define GDB_BUFFER_SIZE 16384
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h
index 9aac806e..a78193c6 100644
--- a/src/target/arm_adi_v5.h
+++ b/src/target/arm_adi_v5.h
@@ -23,7 +23,6 @@
#ifndef ARM_ADI_V5_H
#define ARM_ADI_V5_H
-#include "target.h"
#include "arm_jtag.h"
#define DAP_IR_DPACC 0xA
diff --git a/src/target/armv4_5_mmu.c b/src/target/armv4_5_mmu.c
index d84da482..4651960f 100644
--- a/src/target/armv4_5_mmu.c
+++ b/src/target/armv4_5_mmu.c
@@ -22,6 +22,7 @@
#endif
#include "log.h"
+#include "target.h"
#include "armv4_5_mmu.h"
diff --git a/src/target/armv4_5_mmu.h b/src/target/armv4_5_mmu.h
index bbe50c6b..6b9ed34c 100644
--- a/src/target/armv4_5_mmu.h
+++ b/src/target/armv4_5_mmu.h
@@ -21,7 +21,8 @@
#define ARMV4_5_MMU_H
#include "armv4_5_cache.h"
-#include "target.h"
+
+struct target;
struct armv4_5_mmu_common
{
diff --git a/src/target/armv7a.c b/src/target/armv7a.c
index 7b33053d..7f2c387d 100644
--- a/src/target/armv7a.c
+++ b/src/target/armv7a.c
@@ -25,7 +25,6 @@
#include "armv7a.h"
#include "arm_disassembler.h"
-#include "target.h"
#include "register.h"
#include "binarybuffer.h"
#include "command.h"
diff --git a/src/target/armv7a.h b/src/target/armv7a.h
index facd1505..a4be9e26 100644
--- a/src/target/armv7a.h
+++ b/src/target/armv7a.h
@@ -19,7 +19,6 @@
#ifndef ARMV7A_H
#define ARMV7A_H
-#include "target.h"
#include "arm_adi_v5.h"
#include "armv4_5.h"
#include "armv4_5_mmu.h"
diff --git a/src/target/armv7m.c b/src/target/armv7m.c
index 7ccdf546..d8718f9e 100644
--- a/src/target/armv7m.c
+++ b/src/target/armv7m.c
@@ -35,6 +35,7 @@
#endif
#include "breakpoints.h"
+#include "target.h"
#include "armv7m.h"
#include "algorithm.h"
#include "register.h"
diff --git a/src/target/cortex_a8.h b/src/target/cortex_a8.h
index 230008a5..393a3104 100644
--- a/src/target/cortex_a8.h
+++ b/src/target/cortex_a8.h
@@ -29,7 +29,6 @@
#ifndef CORTEX_A8_H
#define CORTEX_A8_H
-#include "target.h"
#include "armv7a.h"
extern char* cortex_a8_state_strings[];
diff --git a/src/target/target_request.c b/src/target/target_request.c
index 283ce55f..72151555 100644
--- a/src/target/target_request.c
+++ b/src/target/target_request.c
@@ -27,6 +27,7 @@
#include "config.h"
#endif
+#include "target.h"
#include "target_request.h"
#include "target_type.h"
#include "binarybuffer.h"
diff --git a/src/target/target_request.h b/src/target/target_request.h
index cc9f3b9a..e50c425e 100644
--- a/src/target/target_request.h
+++ b/src/target/target_request.h
@@ -26,7 +26,8 @@
#ifndef TARGET_REQUEST_H
#define TARGET_REQUEST_H
-#include "target.h"
+struct target;
+struct command_context;
typedef enum target_req_cmd
{