----------main.c
  #include "main.h"

----------main.h
  #ifndef ヘッダー固有の文字列
  #define ヘッダー固有の文字列
  #include "subA.h"
  #include "subB.h"
  #endif /* ヘッダー固有の文字列 */

----------subA.c
  #include "subA.h"
  int subA;

----------subA.h
  #ifndef ヘッダー固有の文字列
  #define ヘッダー固有の文字列
  #include "main.h"
  extern int subA;
  #endif /* ヘッダー固有の文字列 */

----------subB.c
  #include "subB.h"
  int subB;

----------subB.h
  #ifndef ヘッダー固有の文字列
  #define ヘッダー固有の文字列
  #include "main.h"
  extern int subB;
  #endif /* ヘッダー固有の文字列 */