#include "target.h" less wildly
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 16 Nov 2009 08:35:24 +0000 (00:35 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 16 Nov 2009 08:35:24 +0000 (00:35 -0800)
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>
17 files changed:
src/ecosboard.c
src/flash/at91sam3.c
src/flash/lpc3180_nand_controller.h
src/flash/mflash.c
src/flash/mflash.h
src/openocd.c
src/server/gdb_server.c
src/server/gdb_server.h
src/target/arm_adi_v5.h
src/target/armv4_5_mmu.c
src/target/armv4_5_mmu.h
src/target/armv7a.c
src/target/armv7a.h
src/target/armv7m.c
src/target/cortex_a8.h
src/target/target_request.c
src/target/target_request.h

index 95d41cb6e5f8dd57b9760dd2826500ae584b3572..0cbba3e0a28f0903e1a40cee586f8a09c49caa37 100644 (file)
@@ -26,7 +26,6 @@
 #include "configuration.h"
 #include "xsvf.h"
 #include "svf.h"
-#include "target.h"
 #include "nand.h"
 #include "pld.h"
 
index 0f2be3c1b86e4b156ec8e3c592fce51c44b8e8bb..4507888fcbe797d3306fc05dd7cb6333dd83cc9f 100644 (file)
@@ -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"
index b965be984350a9a8830f0496335e6bb2e1faa8ab..0891cedf7c470da16909655994dd1cd6dd922d0a 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef LPC3180_NAND_CONTROLLER_H
 #define LPC3180_NAND_CONTROLLER_H
 
-#include "target.h"
-
 enum lpc3180_selected_controller
 {
        LPC3180_NO_CONTROLLER,
index c2d04ca4a1ed1935312842e13b2f4a46597114fe..49dc432f36eb002c7a41c5b384264a1a5c15f23b 100644 (file)
@@ -22,6 +22,7 @@
 #endif
 
 #include "mflash.h"
+#include "target.h"
 #include "time_support.h"
 #include "fileio.h"
 #include "log.h"
index ed4a2cddf5d2ffeb2c15a9ed9f2e7facbcb0b3d9..358d25364187b05bd2c32872b74104c569427fa2 100644 (file)
@@ -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;
index e35a0ae596a89296cb1e54c92f3ab250d2fed574..4c075118ddc6eba047a9be586ce67aa1c4bbab75 100644 (file)
@@ -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"
index 21db2965ad151a005d0bb82fe2238846e9865b25..f6b44cd298911225eea2cc08ae3aa3996ee8906b 100644 (file)
 #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"
 
index 4513e8a06adfdb0fa28ba9055fc52da6ed6eae48..a8e8dadb1c99ece4efb42b04e0080fea0ea1f0f8 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef GDB_SERVER_H
 #define GDB_SERVER_H
 
-#include "target.h"
-
 struct image;
 
 #define GDB_BUFFER_SIZE        16384
index 9aac806ecf54545f0217e47911556891ddf822c1..a78193c6d0dd8ed076b4216d5001b7917621c5ba 100644 (file)
@@ -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
index d84da482b86163579c368c7cbd01348ffbf97bd7..4651960f990f12e4db3c4a85f17f1bd9f6c833e7 100644 (file)
@@ -22,6 +22,7 @@
 #endif
 
 #include "log.h"
+#include "target.h"
 #include "armv4_5_mmu.h"
 
 
index bbe50c6ba453fd5f08d237cade5a343ec73ca20e..6b9ed34c0ac5d4fc1ad224b45edbb0357fa94309 100644 (file)
@@ -21,7 +21,8 @@
 #define ARMV4_5_MMU_H
 
 #include "armv4_5_cache.h"
-#include "target.h"
+
+struct target;
 
 struct armv4_5_mmu_common
 {
index 7b33053da491bc55258d9b4cadfdca8cb8899a90..7f2c387dfc283b37236a25d0699aad395f9da506 100644 (file)
@@ -25,7 +25,6 @@
 #include "armv7a.h"
 #include "arm_disassembler.h"
 
-#include "target.h"
 #include "register.h"
 #include "binarybuffer.h"
 #include "command.h"
index facd15054b72bdfc630abdca9b623f9ae1f524f0..a4be9e26b91a4539f34741d8f2014e7662e2723d 100644 (file)
@@ -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"
index 7ccdf546ca0f70cf0ac3c5d13bc8c2a246cce914..d8718f9e97eb96fe342939d29ae3ab96d9a57b22 100644 (file)
@@ -35,6 +35,7 @@
 #endif
 
 #include "breakpoints.h"
+#include "target.h"
 #include "armv7m.h"
 #include "algorithm.h"
 #include "register.h"
index 230008a556513f6f060063bcf226df4f68368dde..393a3104b9c0744aaac2613bac4f8a79ea21d2cd 100644 (file)
@@ -29,7 +29,6 @@
 #ifndef CORTEX_A8_H
 #define CORTEX_A8_H
 
-#include "target.h"
 #include "armv7a.h"
 
 extern char* cortex_a8_state_strings[];
index 283ce55f3752fe3456e4d4b7ce9f33fd10e9120e..721515552c9d0463c18b21d3052254caa85cc668 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 #endif
 
+#include "target.h"
 #include "target_request.h"
 #include "target_type.h"
 #include "binarybuffer.h"
index cc9f3b9ac9bbd6b794b4c1f7796c2c1e54c93795..e50c425e0f59e872dd62adcfd1bbc1e8d5e4dbf9 100644 (file)
@@ -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
 {