/*
 * Define a few common macros.  Caution: cpp will expand a, b, or c
 * before concatenating them ONLY IF they are parameters of a lexically
 * enclosing macro definition.
 */
#define XCOMM #
#define	YES 1
#define NO 0
#define NullParameter /**/

#if __STDC__
#define Concat(a,b) a##b
#else
#define Concat(a,b) a/**/b
#endif

#if __STDC__
#define Concat3(a,b,c) a##b##c
#else
#define Concat3(a,b,c) a/**/b/**/c
#endif

/*
 * Define the OS platform (UltrixArchitecture, etc).
 * Define the CPU architecture (MIPSEL, SUN4, etc.).
 * Define the name of the platform-specific .cf file.
 */
#ifdef ULTRIX
#  define UltrixArchitecture
#  ifdef mips
#    define MipsArchitecture
#    undef PMAX
#    undef pmax
#    define ArchitectureName PMAX
#    define architectureName pmax	
#  endif
#  define MacroIncludeFile <iv-ultrix.cf>
#  define MacroFile InterViews/iv-ultrix.cf
#endif /* ultrix */

#ifdef OSF1
#  ifdef __alpha
#    define AlphaArchitecture
#    undef ALPHA_OSF1
#    undef alpha_osf1
     /* mpichler/hleitner, 19950116: additional gnu environment; call imake with -D__GNUC__ */
#    ifdef __GNUC__
#      define SpecialArchitectureFlags -D__GNUC__
#      define ArchitectureName ALPHA_GNU
#      define architectureName alpha_gnu
#      define MacroIncludeFile <iv-osf1_gnu.cf>
#      define MacroFile InterViews/iv-osf1_gnu.cf
#    else  /* cxx */
#      define ArchitectureName ALPHA_OSF1
#      define architectureName alpha_osf1
#      define MacroIncludeFile <iv-osf1.cf>
#      define MacroFile InterViews/iv-osf1.cf
#    endif /* gnu */
#  endif /* __alpha */
#endif /* OSF1 */

#ifdef sun
#  define SunArchitecture
#  ifdef sparc
#    ifdef SOLARIS
#      undef SUN5
#      undef sun5
#      define ArchitectureName SUN5
#      define architectureName sun5
#    else
#      undef SUN4
#      undef sun4
#      define ArchitectureName SUN4
#      define architectureName sun4
#    endif
#  endif
#  ifndef ArchitectureName
#    undef SUN
#    undef sun
#    define ArchitectureName SUN
#    define architectureName sun
#  endif
#  define MacroIncludeFile <iv-sun.cf>
#  define MacroFile InterViews/iv-sun.cf
#endif /* sun */

#ifdef hpux
#  define HPArchitecture
#  ifdef HPUX
#    undef HPUX9
#    undef hpux9
#    define ArchitectureName HPUX9
#    define architectureName hpux9
#  endif
#  ifndef ArchitectureName
#    undef HP
#    undef hp
#    define ArchitectureName HP
#    define architectureName hp
#  endif
#  define MacroIncludeFile <iv-hp.cf>
#  define MacroFile InterViews/iv-hp.cf
#endif /* hpux */

#ifdef sgi
#undef SGI
#undef sgi
#define SGIArchitecture
#define MipsArchitecture
#define ArchitectureName SGI
#define architectureName sgi
#define MacroIncludeFile <iv-sgi.cf>
#define MacroFile InterViews/iv-sgi.cf
#endif /* sgi */

#ifdef linux
#  undef LINUX
#  undef linux
#  define LinuxArchitecture
#  define ArchitectureName LINUX
#  define architectureName linux
#  define MacroIncludeFile <iv-linux.cf>
#  define MacroFile InterViews/iv-linux.cf
#endif

#ifdef sco
/* contributed by mwhyles@merlyn.galstar.com */
#undef SCO
#undef sco
#define SCOArchitecture
#define ArchitectureName SCO
#define architectureName sco
#define MacroIncludeFile <iv-sco.cf>
#define MacroFile iv-sco.cf
#endif

#if defined(ibm) || defined(_IBMR2) || defined(aix)
#  undef ibm
#  define IBMArchitecture
#  ifdef aix
#    undef aix
#    undef IBMaix
#    undef ibmAIX
#    define AIXArchitecture
#    define ArchitectureName IBMaix
#    define architectureName ibmAIX
#  endif
#  ifndef ArchitectureName
#    undef IBM
#    undef ibm
#    define ArchitectureName IBM
#    define architectureName ibm
#  endif
#  define MacroIncludeFile <iv-ibm.cf>
#  define MacroFile InterViews/iv-ibm.cf
#endif /* ibm */

#ifdef usl
/* contributed by mike@novell.co.uk */
#define ArchitectureName i386SVR4
#define i386SVR4Architecture    YES
#define SVR4ix86Architecture    YES 
#  define MacroIncludeFile <iv-UnixWare.cf>
#  define MacroFile InterViews/iv-UnixWare.cf
#endif /* usl */


#ifndef ArchitectureName
XCOMM WARNING: Imakefile not configured; guessing at definitions!!!
XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
#undef UNKNOWN
#undef unknown
#define ArchitectureName UNKNOWN
#define architectureName unknown
#define MacroIncludeFile <iv-generic.cf>
#define MacroFile InterViews/iv-generic.cf
#endif /* UNKNOWN */

XCOMM Read IMAKE_TEMPLATE to understand how this Makefile was generated.
XCOMM Edit <arch.def> to add support for a new platform.
XCOMM Edit MacroIncludeFile to change platform-specific parameters.
XCOMM Edit <local.def> to change site-specific parameters.
XCOMM Edit INCLUDE_IMAKEFILE to change actions that make should perform.

XCOMM architecture:  ArchitectureName
