/*
 * Copyright (C) 1991 by the Massachusetts Institute of Technology.
 * For copying and distribution information, see the file "mit-copyright.h".
 */


/**/###########################################################################
/**/# Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
/**/# $Header: /afs/sipb.mit.edu/project/sipb-athena/repository/src/olc/config/Imake.tmpl,v 1.2 1995/10/21 21:23:46 svalente Exp $
/**/#
/**/# Platform-specific parameters may be set in the appropriate .cf
/**/# configuration files.  Site-wide parameters may be set in the file
/**/# site.def.  Full rebuilds are recommended if any parameters are changed.
/**/#
/**/# If your C preprocessor doesn't define any unique symbols, you'll need
/**/# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
/**/# "make Makefile", "make Makefiles", or "make World").
/**/#
/**/# If you absolutely can't get imake to work, you'll need to set the 
/**/# variables at the top of each Makefile as well as the dependencies at the
/**/# bottom (makedepend will do this automatically).
/**/#


#define	YES	1
#define NO	0


/*
 * To add support for another platform:
 * 
 *     1.  Identify a machine-specific cpp symbol.  If your preprocessor 
 *         doesn't have any built in, you'll need to add the symbol to the
 *         cpp_argv table in util/imake/imake.c and rebuild imake with the
 *         BOOTSTRAPCFLAGS variable set (see the macII for an example).
 *
 *     2.  Add all machine-specific cpp symbols (either defined by you or by
 *         the preprocessor or compiler) to the predefs table in 
 *         util/makedepend/main.c.
 *
 *     3.  But a new #ifdef block below that defines MacroIncludeFile and
 *         MacroFile for your new platform and then #undefs the machine-
 *         specific preprocessor symbols (to avoid problems with file names).
 *
 *     4.  Create a .cf file with the name given by MacroFile.
 */

#ifdef ultrix
#define MacroIncludeFile <ultrix.cf>
#define MacroFile ultrix.cf
#ifdef vax
#undef vax
#define VaxArchitecture
#endif
#ifdef mips
#undef mips
#define MipsArchitecture
#endif
#undef ultrix
#define UltrixArchitecture
#endif

#if defined(vax) && !defined(UltrixArchitecture)
#define MacroIncludeFile <bsd.cf>
#define MacroFile bsd.cf
#undef vax
#define VaxArchitecture
#endif

#ifdef sun
#define MacroIncludeFile <sun.cf>
#define MacroFile sun.cf
#undef sun
#define SunArchitecture
#endif /* sun */

#ifdef hpux
#define MacroIncludeFile <hp.cf>
#define MacroFile hp.cf
#undef hpux
#define HPArchitecture
#endif /* hpux */

#ifdef att
#define MacroIncludeFile <att.cf>
#define MacroFile att.cf
#undef att
#define ATTArchitecture
#endif /* att */

#ifdef apollo
#define MacroIncludeFile <apollo.cf>
#define MacroFile apollo.cf
#undef apollo
#define ApolloArchitecture
#endif /* apollo */

#ifdef sony
#define MacroIncludeFile <sony.cf>
#define MacroFile sony.cf
#undef sony
#define SonyArchitecture
#endif /* sony */

#ifdef M4310
#define MacroIncludeFile <pegasus.cf>
#define MacroFile pegasus.cf
#undef M4310
#define PegasusArchitecture
#endif /* M4310 */

#ifdef M4330
#define MacroIncludeFile <m4330.cf>
#define MacroFile m4330.cf
#undef  M4330
#define M4330Architecture
#endif /* M4330 */

#ifdef macII
/* A/UX cpp has no unique symbol:  build imake with BOOTSTRAPCFLAGS=-DmacII */
#define MacroIncludeFile <macII.cf>
#define MacroFile macII.cf
#undef  macII
#define MacIIArchitecture
#endif /* macII */

#ifdef CRAY
#define MacroIncludeFile <cray.cf>
#define MacroFile cray.cf
#undef cray
#undef CRAY
#define CrayArchitecture
#endif /* CRAY */

#ifdef sgi
#define MacroIncludeFile <sgi.cf>
#define MacroFile sgi.cf
#undef sgi
#define SGIArchitecture
#undef mips
#define MipsArchitecture
#endif

#if defined(mips) && !defined(UltrixArchitecture) && !defined(SGIArchitecture)
#define MacroIncludeFile <umips.cf>
#define MacroFile umips.cf
#undef mips
#undef umips
#define MipsArchitecture
#define UMipsArchitecture
#endif


/*
 * A convenience for people running on rt's
 */
#if defined(ibm032) && !defined(ibm)
#define ibm
#endif

#if defined(ibm)
#define MacroIncludeFile <ibm.cf>
#define MacroFile ibm.cf
#undef ibm
#define IBMArchitecture
#ifdef i386
#undef i386
#define PS2Architecture
#endif
#ifdef ibm032
#undef ibm032
#define RtArchitecture
#endif
#ifdef _IBMR2
#undef _IBMR2
#define RiosArchitecture
#endif
#ifdef aix
#undef aix
#define AIXArchitecture
#endif
#endif /* ibm */

#ifdef linux
#undef linux
#define LinuxArchitecture
#define MacroIncludeFile <linux.cf>
#define MacroFile linux.cf
#endif

#ifdef __NetBSD__
#undef __NetBSD__
#define NetBSDArchitecture
#define MacroIncludeFile <netbsd.cf>
#define MacroFile netbsd.cf
#endif

#ifndef concat
#ifdef __STDC__
#define concat(x,y) x##y
#else
#define concat(x,y) x/**/y
#endif
#endif

#ifndef MacroIncludeFile
/**/# WARNING:  Imake.tmpl not configured; guessing at definitions!!!
/**/# This might mean that BOOTSTRAPCFLAGS wasn't set when building imake.
#define MacroIncludeFile <generic.cf>
#define MacroFile generic.cf
#endif

/*****************************************************************************
 *                                                                           *
 *                       DO NOT MODIFY BELOW THIS LINE                       *
 *                                                                           *
 *****************************************************************************/


/**/###########################################################################
/**/# platform-specific configuration parameters - edit MacroFile to change
#include MacroIncludeFile

/**/###########################################################################
/**/# site-specific configuration parameters - edit site.def to change
#include <site.def>

/**/###########################################################################
/**/# end of site-specific code

/*
 * defaults for various generic parameters; set in site.def if needed
 */

#ifndef SystemV
#ifdef SYSV
#define SystemV			YES	/* need system 5 style */
#else
#define SystemV			NO	/* bsd */
#endif
#endif
#ifndef OSMajorVersion
#define OSMajorVersion          0
#endif
#ifndef OSMinorVersion
#define OSMinorVersion          0
#endif

#ifndef Posix
#define Posix			0    /* This is an ancient default */
#endif

#ifndef HaveTermIO
#define HaveTermIO		0    /* If 0, uses BSD-style terminal
					control */
#endif

#ifndef HaveDefErrno
#define HaveDefErrno		1 /* If 0, sys/errno.h doesn't define errno or
				      sys_errlist */
#endif

#ifndef HaveSelectMacros
#define HaveSelectMacros	1  /* If 0, needs FD_SET et al defined */
#endif

#ifndef HaveAnsiIncludes
#define HaveAnsiIncludes	0  /* If 1, include files already have
				      function prototypes */
#endif

#ifndef UseSharedLibs
#define UseSharedLibs           0 /* If 1, look for libraries first in
                                     /usr/athena/lib/shared */
#endif

#ifndef HasVFork
#if SystemV
#define HasVFork		NO	/* not yet... */
#else
#define HasVFork		YES
#endif
#endif

#ifndef HasPutenv
#define HasPutenv		NO	/* assume not */
#endif

#ifndef HasVoidSignalReturn
#if SystemV
#define HasVoidSignalReturn	YES
#else
#define HasVoidSignalReturn	NO	/* may or may not be true */
#endif
#endif

#ifndef HasSaberC
#define HasSaberC		NO	/* for people unclear on the concept */
#endif

#ifndef StripInstalledPrograms
#define StripInstalledPrograms YES
#endif

/* Set flags based on preferences set... */

#if Posix
#define PosixDef	-DPOSIX
#else
#define PosixDef
#endif

#if HaveTermIO
#define TermIODef	-DTERMIO
#else
#define TermIODef
#endif

#if HaveDefErrno
#define ErrnoDef
#else
#define ErrnoDef	-DNEEDS_ERRNO_DEFS
#endif

#if HaveSelectMacros
#define SelectMDef
#else
#define SelectMDef	-DNEEDS_SELECT_MACROS
#endif

#if HaveAnsiIncludes
#define AnsiIDef	-DHAS_ANSI_INCLUDES
#else
#define AnsiIDef
#endif

#if HasVFork
#define VforkDef
#else
#define VforkDef	-DNO_VFORK
#endif

#if HasPutenv  
#define PutenvDef	-DPUTENV
#else
/* otherwise, it uses setenv */
#define PutenvDef
#endif

#if HasVoidSignalReturn
#define SigRetDef	-DVOID_SIGRET
#else
/* otherwise, it has int * signal returns */
#define SigRetDef
#endif

#if UseSharedLibs
LDFLAGS = -L/usr/athena/lib/shared
#endif

#define OptionDefines TermIODef PutenvDef ErrnoDef SelectMDef \
AnsiIDef VforkDef SigRetDef PosixDef


#ifndef DestDir
#define DestDir /* as nothing */
#endif

#ifndef BourneShell                   /* to force shell in makefile */
#define BourneShell           /bin/sh
#endif

#ifndef OptimizedCDebugFlags
#define OptimizedCDebugFlags -O
#endif
#ifndef DebuggableCDebugFlags
#define DebuggableCDebugFlags -g
#endif
#ifndef NoOpCDebugFlags
#define NoOpCDebugFlags /* as nothing */
#endif
#ifndef DefaultCDebugFlags
#define DefaultCDebugFlags DebuggableCDebugFlags
#endif
#ifndef LibraryCDebugFlags
#define LibraryCDebugFlags DebuggableCDebugFlags
#endif
#ifndef DefaultCCOptions
#define DefaultCCOptions /* as nothing: this is for floating point, etc. */
#endif
#ifndef DefaultCPlusPlusOptions
#define DefaultCPlusPlusOptions /* empty */
#endif
#ifndef LibraryCCOptions
#define LibraryCCOptions DefaultCCOptions
#endif
#ifndef InstPgmFlags
#define InstPgmFlags -s
#endif
#ifndef InstBinFlags
#define InstBinFlags -m 0755
#endif
#ifndef InstUidFlags
#define InstUidFlags -m 4755
#endif
#ifndef InstLibFlags
#define InstLibFlags -m 0664
#endif
#ifndef InstIncFlags
#define InstIncFlags -m 0444
#endif
#ifndef InstManFlags
#define InstManFlags -m 0444
#endif
#ifndef InstDatFlags
#define InstDatFlags -m 0444
#endif
#ifndef InstKmemFlags
#define InstKmemFlags InstUidFlags    /* put -g kmem -m 2755 in site.def... */
#endif
#ifndef ArCmd
#define ArCmd ar clq	/* use local dir for temp files */
#endif

#ifndef BootstrapCFlags
#define BootstrapCFlags /**/
#endif
#ifndef CcCmd
#define CcCmd cc
#endif
#ifndef CppCmd
#define CppCmd /lib/cpp
#endif
#ifndef PreProcessCmd
#define PreProcessCmd CcCmd -E
#endif
#ifndef InstallCmd
#define InstallCmd install
#endif
#ifndef LdCmd
#define LdCmd ld
#endif
#ifndef LintCmd
#define LintCmd lint
#endif
#ifndef LintLibFlag
#if SystemV
#define LintLibFlag -o
#else
#define LintLibFlag -C
#endif
#endif
#ifndef LintOpts
#if SystemV
#define LintOpts -ax
#else
#define LintOpts -axz
#endif
#endif
#ifndef CpCmd
#define CpCmd cp
#endif
#ifndef LnCmd
#if SystemV
#define LnCmd ln /* or even cp */
#else
#define LnCmd ln -s
#endif
#endif
#ifndef MakeCmd
#define MakeCmd make
#endif
#ifndef MvCmd
#define MvCmd mv
#endif
#ifndef RanlibCmd
#if SystemV
#define RanlibCmd /bin/true
#else
#define RanlibCmd ranlib
#endif
#endif
#ifndef RanlibInstFlags
#define RanlibInstFlags /**/
#endif
#ifndef RmCmd
#define RmCmd rm -f
#endif
#ifndef StandardCppDefines
#if SystemV
#define StandardCppDefines -DSYSV
#else
#define StandardCppDefines /**/
#endif
#endif
#ifndef StandardIncludes
#define StandardIncludes /**/			/* for platform-specifics */
#endif

#ifndef ExtraLibraries
#define ExtraLibraries /**/
#endif
#ifndef ExtraLoadFlags
#define ExtraLoadFlags /**/
#endif
#ifndef CompatibilityFlags
#define CompatibilityFlags /**/
#endif
#ifndef TagsCmd
#define TagsCmd etags -t
#endif
#ifndef LoaderLibPrefix
#define LoaderLibPrefix /**/			/* cray does -l libX11.a */
#endif
#ifndef TOPDIR
#define TOPDIR .
#endif
#ifndef CURDIR
#define CURDIR .
#endif
#ifndef CONFDIR
#define CONFDIR ${TOP}/config
#endif

            SHELL = BourneShell

              TOP = TOPDIR
      CURRENT_DIR = CURDIR

               AR = ArCmd
  BOOTSTRAPCFLAGS = BootstrapCFlags	/* set if cpp doesn't have uniq sym */
               CC = CcCmd
              C++ = CPlusPlusCmd
#if HasFortran
               FC = FortranCmd
      FDEBUGFLAGS = FortranDebugFlags
          FCFLAGS = FortranFlags $(FDEBUGFLAGS)
#endif
         COMPRESS = CompressCmd
              CPP = CppCmd $(STD_CPP_DEFINES)		/* simple filters */
    PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES)	/* prefered; mdep */
          INSTALL = InstallCmd
               LD = LdCmd
             LINT = LintCmd
      LINTLIBFLAG = LintLibFlag
         LINTOPTS = LintOpts
               LN = LnCmd
             MAKE = MakeCmd
               MV = MvCmd
               CP = CpCmd
           RANLIB = RanlibCmd
  RANLIBINSTFLAGS = RanlibInstFlags
               RM = RmCmd
     STD_INCLUDES = StandardIncludes
  STD_CPP_DEFINES = StandardCppDefines
      STD_DEFINES = StandardDefines OptionDefines
 EXTRA_LOAD_FLAGS = ExtraLoadFlags
  EXTRA_LIBRARIES = ExtraLibraries
             TAGS = TagsCmd
#if ConstructMFLAGS
           MFLAGS = -$(MAKEFLAGS)
#endif

#if StripInstalledPrograms
     INSTPGMFLAGS = InstPgmFlags	/* install flags for stripping */
#else
     INSTPGMFLAGS = 
#endif
     INSTBINFLAGS = InstBinFlags	/* install flags for programs */
     INSTUIDFLAGS = InstUidFlags	/* install flags for setuid programs */
     INSTLIBFLAGS = InstLibFlags	/* install flags for libraries */
     INSTINCFLAGS = InstIncFlags	/* install flags for headers */
     INSTMANFLAGS = InstManFlags	/* install flags for man pages */
     INSTDATFLAGS = InstDatFlags	/* install flags for data files */
    INSTKMEMFLAGS = InstKmemFlags	/* install flags for /dev/kmem progs */

          DESTDIR = DestDir		/* root of install */

         INCLUDES = 

      CDEBUGFLAGS = DefaultCDebugFlags
        CCOPTIONS = DefaultCCOptions	/* to distinguish from param flags */
      COMPATFLAGS = CompatibilityFlags
       ALLDEFINES = $(STD_INCLUDES) $(INCLUDES) $(STD_DEFINES) $(DEFINES) $(COMPATFLAGS)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
       C++OPTIONS = DefaultCPlusPlusOptions
         C++FLAGS = $(C++OPTIONS) $(CFLAGS)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) 

        MACROFILE = MacroFile
           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
			gmon.out .emacs_* tags TAGS make.log MakeOut

    IMAKE_DEFINES = /* leave blank, for command line use only */
            IMAKE = imake
         IRULESRC = $(CONFIGDIR)
        IMAKE_CMD = $(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES) \
			-s Makefile
     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
			$(IRULESRC)/$(MACROFILE)
MAKEDEPEND = makedepend
DEPEND = $(MAKEDEPEND)


/*
 * get project-specific configuration and rules
 */

#include <Project.tmpl>



#include <Imake.rules>

/**/###########################################################################
/**/# start of Imakefile
#include INCLUDE_IMAKEFILE

/**/###########################################################################
/**/# common rules for all Makefiles - do not edit

/*
 * These need to be here so that rules in Imakefile occur first;  the blank
 * all is to make sure that an empty Imakefile doesn't default to make clean.
 */
emptyrule::

CleanTarget()

#ifndef IHaveSpecialMakefileTarget
MakefileTarget()
#endif

TagsTarget()
#ifdef MakefileAdditions
MakefileAdditions()
#endif

#if HasSaberC
saber:
	#load $(ALLDEFINES) $(SRCS)

osaber:
	#load $(ALLDEFINES) $(OBJS)
#endif


#ifdef IHaveSubdirs
/**/###########################################################################
/**/# rules for building in SUBDIRS - do not edit

MakeSubdirs($(SUBDIRS))
InstallSubdirs($(SUBDIRS))
InstallManSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
CleanSubdirs($(SUBDIRS))
TagSubdirs($(SUBDIRS))
MakefileSubdirs($(SUBDIRS))
IncludesSubdirs($(SUBDIRS))

#else
/**/###########################################################################
/**/# empty rules for directories that do not have SUBDIRS - do not edit

install::
	@echo "install in $(CURRENT_DIR) done"

install.man::
	@echo "install.man in $(CURRENT_DIR) done"

Makefiles::

includes::

#endif /* if subdirectory rules are needed */

/**/###########################################################################
/**/# dependencies generated by makedepend
