/*
 * $XConsortium: imakemdep.h,v 1.10 89/12/18 16:56:38 jim Exp $
 * 
 * This file contains machine-dependent constants for the imake utility.  When
 * porting imake, read each of the steps below and add in any necessary
 * definitions.  Do *not* edit ccimake.c or imake.c!
 */

#ifdef CCIMAKE
/*
 * Step 1:  imake_ccflags
 *     Define any special flags that will be needed to get imake.c to compile.
 *     These will be passed to the compile along with the contents of the
 *     make variable BOOTSTRAPCFLAGS.
 *
 * ARM: no special flags are needed
 */


#else /* not CCIMAKE */
#ifndef MAKEDEPEND
/*
 * Step 2:  dup2
 *     If your OS doesn't have a dup2() system call to duplicate one file
 *     descriptor onto another, define such a mechanism here (if you don't
 *     already fall under the existing category(ies).
 *
 * ARM: all environments except strict ansi provide a dup2 function.  In general
 *	X programs should be built in one of the operating system environments
 *	which support POSIX type operating system functionality, since the SVR2
 *	SVID doesn't this is fixed up below.
 */
#ifdef _SVR2_C
#define dup2 $dup2
#endif


/*
 * Step 3:  FIXUP_CPP_WHITESPACE
 *     If your cpp collapses tabs macro expansions into a single space and
 *     replaces escaped newlines with a space, define this symbol.  This will
 *     cause imake to attempt to patch up the generated Makefile by looking
 *     for lines that have colons in them (this is why the rules file escapes
 *     all colons).  One way to tell if you need this is to see whether or not
 *     your Makefiles have no tabs in them and lots of @@ strings.
 */


/*
 * Step 4:  DEFAULT_CPP
 *     If the C preprocessor does not live in /lib/cpp, set this symbol to 
 *     the appropriate location.
 */
#define DEFAULT_CPP "/usr/lib/cpp"


/*
 * Step 5:  cpp_argv
 *     The following table contains the cpp flags that should be passed to 
 *     cpp whenever a Makefile is being generated.  If your preprocessor 
 *     doesn't predefine any unique symbols, choose one and add it to the
 *     end of this table.  Then, do the following:
 * 
 *         a.  Use this symbol at the top of Imake.tmpl when setting MacroFile.
 *         b.  Put this symbol in the definition of BootstrapCFlags in your
 *             <platform>.cf file.
 *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
 *             to the end of the command line.
 * 
 *     Note that you may define more than one symbols (useful for platforms 
 *     that support multiple operating systems).
 *
 * ARM:	-Uunix is left in in case the compiler used still defines this
 *	symbol.  Support for all other systems has been removed (since they
 *	all depend on symbols which are illegal in a conforming ANSI 
 *	system).
 */

#define	ARGUMENTS 50	/* number of arguments in various arrays */
char *cpp_argv[ARGUMENTS] = {
	"cpp",		/* replaced by the actual cpp program to exec */
	"-I.",		/* add current directory to include path */
#ifdef unix
	"-Uunix",	/* remove unix symbol so that filename unix.c okay */
#endif
};
#else /* else MAKEDEPEND */
/*
 * Step 6:  predefs
 *     If your compiler and/or preprocessor define any specific symbols, add
 *     them to the the following table.  The definition of struct symtab is
 *     in util/makedepend/main.c.
 *
 * ARM:	GCC support remains, other (non-Acorn) operating system support
 *	has been removed.  Notice that no operating system specific defines
 *	are included.  This allows makedepend to work in all operating 
 *	system environments although the /usr/include dependencies might
 *	be incomplete as a result.
 */
struct symtab	predefs[] = {
#ifdef __GNUC__
	{"__GNUC__", "1"},
#endif
#ifdef __STDC__
	{"__STDC__", "1"},
#endif
#ifdef __arm
	{"__arm", "1"},
#endif
#ifdef __unix
	{"__unix", "1"},
#endif
#ifdef __acorn
	{"__acorn", "1"},
#endif
	/* add any additional symbols before this line */
	{NULL, NULL}
};

#endif /* MAKEDEPEND */
#endif /* CCIMAKE */
