/*
$Id: arch.def,v 1.5 1997/01/31 15:40:41 bheide Exp $
 
$Log: arch.def,v $
Revision 1.5  1997/01/31 15:40:41  bheide
added support for BSDI

Revision 1.4  1996/07/25 14:54:23  bheide
added support for Linux ELF

Revision 1.3  1996/04/10 11:36:04  bheide
added support for FreeBSD

Revision 1.2  1996/01/30 11:53:47  hleitner
arch.def extended to support AIX 4.x; we check the Macro "AIXV4" to decide which
MacroIncludeFile to use.

Revision 1.1  1995/11/13 09:53:25  hleitner
Initial revision

*/

/*
 * 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 /**/


/*
 * 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
#    ifdef __GNUC__
#      define PmaxGnuArchitecture
#      define ArchitectureName PMAX_GNU
#      define architectureName pmax_gnu
#      define MacroIncludeFile <hg_ultrix_gnu.cf>
#      define MacroFile hg_ultrix_gnu.cf
#    else  /* CC */
#      define PmaxCCArchitecture
#      define ArchitectureName PMAX
#      define architectureName pmax	
#      define MacroIncludeFile <hg_ultrix.cf>
#      define MacroFile hg_ultrix.cf
#    endif  /* __GNUC__ */
#  endif
#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 AlphaGnuArchitecture
#      define ArchitectureName ALPHA_GNU
#      define architectureName alpha_gnu
#      define MacroIncludeFile <hg_osf1_gnu.cf>
#      define MacroFile hg_osf1_gnu.cf
#    else  /* cxx */
#      define AlphaCxxArchitecture
#      define ArchitectureName ALPHA_OSF1
#      define architectureName alpha_osf1
#      define MacroIncludeFile <hg_osf1.cf>
#      define MacroFile hg_osf1.cf
#    endif /* gnu */
#  endif /* __alpha */
#endif /* OSF1 */


#ifdef sun
#  define SunArchitecture
#  ifdef sparc
#    ifdef SOLARIS
#      undef SUN5
#      undef sun5
#      define SolarisArchitecture
#      ifdef __GNUC__
#        define SolarisGnuArchitecture
#        define ArchitectureName SUN5_GNU
#        define architectureName sun5_gnu
#        define MacroIncludeFile <hg_solaris_gnu.cf>
#        define MacroFile hg_solaris_gnu.cf
#      else  /* propr. CC */
#        define SolarisCCArchitecture
#        define ArchitectureName SUN5
#        define architectureName sun5
#        define MacroIncludeFile <hg_solaris.cf>
#        define MacroFile hg_solaris.cf
#      endif  /* __GNUC__ */

#    else  /* not Solaris: -> SunOS 4.1.x */
#      undef SUN4
#      undef sun4
#      define SunOsArchitecture
#      ifdef __GNUC__
#        define SunOSGnuArchitecture
#        define ArchitectureName SUN4_GNU
#        define architectureName sun4_GNU
#        define MacroIncludeFile <hg_sun_gnu.cf>
#        define MacroFile hg_sun_gnu.cf
#      else  /* propr. CC */
#        define SunOSCCArchitecture
#        define ArchitectureName SUN4
#        define architectureName sun4
#        define MacroIncludeFile <hg_sun.cf>
#        define MacroFile hg_sun.cf
#      endif  /* __GNUC__ */
#    endif  /* Solaris */
#  endif  /* sparc */
#endif /* sun */


#ifdef hpux
#  define HPArchitecture
#  ifdef HPUX
#    undef HPUX9
#    undef hpux9
#    ifdef __GNUC__
#      define HpuxGnuArchitecture
#      define ArchitectureName HPUX9_GNU
#      define architectureName hpux9_gnu
#      define MacroIncludeFile <hg_hp_gnu.cf>
#      define MacroFile hg_hp_gnu.cf
#    else  /* CC */
#      define HpuxCCArchitecture
#      define ArchitectureName HPUX9
#      define architectureName hpux9
#      define MacroIncludeFile <hg_hp.cf>
#      define MacroFile hg_hp.cf
#    endif  /* GNUC */
#  endif  /* HPUX */
#endif /* hpux */


#ifdef sgi
#  undef SGI
#  undef sgi
#  define SGIArchitecture
#  define MipsArchitecture
#  ifdef __GNUC__
#    define SgiGnuArchitecture
#    define ArchitectureName SGI_GNU
#    define architectureName sgi_gnu
#    define MacroIncludeFile <hg_sgi_gnu.cf>
#    define MacroFile hg_sgi_gnu.cf
#  else  /* CC */
#    define SgiCCArchitecture
#    define ArchitectureName SGI
#    define architectureName sgi
#    define MacroIncludeFile <hg_sgi.cf>
#    define MacroFile hg_sgi.cf
#  endif /* gnu */
#endif /* sgi */


#ifdef linux
#  undef LINUX
#  undef linux
#  define LinuxArchitecture
#  ifdef LINUX_OLD
#    undef LINUX_OLD
#    undef linux_old
#    define ArchitectureName LINUX_OLD
#    define architectureName linux_old
#    define MacroIncludeFile <hg_linux_old.cf>
#    define MacroFile hg_linux_old.cf
#  else
#    ifdef LINUX_ELF
#      undef LINUX_ELF
#      undef linux_elf
#      define ArchitectureName LINUX_ELF
#      define architectureName linux_elf
#      define MacroIncludeFile <hg_linux_elf.cf>
#      define MacroFile hg_linux_elf.cf
#    else
#      define ArchitectureName LINUX
#      define architectureName linux
#      define MacroIncludeFile <hg_linux.cf>
#      define MacroFile hg_linux.cf
#    endif
#  endif
#endif


#if defined(ibm) || defined(_IBMR2) || defined(aix)
#  undef ibm
#  define IBMArchitecture
#  ifdef aix
#    undef aix
#    undef IBMaix
#    undef ibmAIX
#    define AIXArchitecture
#    ifdef __GNUC__
#      define AIXGnuArchitecture
#      define ArchitectureName IBMAIX_GNU
#      define architectureName ibmaix_gnu
#      ifdef AIXV4
#        define MacroIncludeFile <hg_aix4_gnu.cf>
#        define MacroFile hg_aix4_gnu.cf
#      else
#        define MacroIncludeFile <hg_aix_gnu.cf>
#        define MacroFile hg_aix_gnu.cf
#      endif
#    else  /* CC */
#      define AIXCCArchitecture
#      define ArchitectureName IBMAIX
#      define architectureName ibmaix
#      define MacroIncludeFile <hg_aix.cf>
#      define MacroFile hg_aix.cf
#    endif  /* GNUC */
#  endif  /* aix */
#endif /* ibm */


#ifdef FreeBSD
#  undef FREEBSD
#  undef freebsd
#  undef FreeBSD
#  define FreeBSDArchitecture
#  define ArchitectureName FREEBSD
#  define architectureName freebsd
#  define MacroIncludeFile <hg_freebsd.cf>
#  define MacroFile hg_freebsd.cf
#endif


#ifdef bsdi
#  undef BSDI
#  undef bsdi
#  define BSDIArchitecture
#  define ArchitectureName BSDI
#  define architectureName bsdi
#  define MacroIncludeFile <hg_bsdi.cf>
#  define MacroFile hg_bsdi.cf
#endif


#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 <hg_generic.cf>
#define MacroFile InterViews/hg_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 <hg_special.def> to change site-specific parameters.
XCOMM Edit INCLUDE_IMAKEFILE to change actions that make should perform.

XCOMM architecture:  ArchitectureName
