/*
 *      $Id: Template,v 1.52 2009-09-06 18:10:18 haley Exp $
 */
/************************************************************************
*									*
*			     Copyright (C)  1993			*
*	     University Corporation for Atmospheric Research		*
*			     All Rights Reserved			*
*									*
************************************************************************/
/*
 *	File:		Template
 *
 *	Author:		Jeff W. Boote
 *			National Center for Atmospheric Research
 *			PO 3000, Boulder, Colorado
 *
 *	Date:		Fri Apr 30 15:25:19 MDT 1993
 *
 *	Description:	Template file for ymake
 */

NGCOMM########################################################################
NGCOMM
NGCOMM In main Template
NGCOMM
NGCOMM########################################################################

#define YES 1
#define NO 0

SYSTEM_INCLUDE		= SystemIncludesName
DATE                    = $(shell date +%d%b%Y_%H%M)

/*
 *OS1_DEF		=	_OpSysDef -framework OpenCL
 */
OS1_DEF		=	_OpSysDef
OS2_DEF		=	_OpSys2Def
OS_DEF		=	$(OS1_DEF) $(OS2_DEF)
ARCH_DEF	=	_ArchDef
VENDOR_DEF	=	_VendorDef

#define	MAJOR		_Major
#define	MINOR		_Minor

MAJOR_DEF	=	-DMAJOR=_Major
MINOR_DEF	=	-DMINOR=_Minor
#ifdef	_SubMinor
#define	SUBMINOR	_SubMinor
SUBMINOR_DEF	=	-DSUBMINOR=_SubMinor
#else
SUBMINOR_DEF	=
#endif

NGCOMM########################################################################
NGCOMM
NGCOMM Including Site - first time
NGCOMM
NGCOMM########################################################################
#define FirstSite
#include SiteFile
#undef FirstSite
NGCOMM########################################################################
NGCOMM
NGCOMM After Including Site - first time
NGCOMM
NGCOMM########################################################################

NGCOMM########################################################################
NGCOMM
NGCOMM Including SystemIncludesName
NGCOMM
NGCOMM########################################################################
#include SystemIncludes
NGCOMM########################################################################
NGCOMM
NGCOMM After Including SystemIncludesName
NGCOMM
NGCOMM########################################################################

NGCOMM########################################################################
NGCOMM
NGCOMM Including Site - second time
NGCOMM
NGCOMM########################################################################
#define SecondSite
#include SiteFile
#undef SecondSite
NGCOMM########################################################################
NGCOMM
NGCOMM After Including Site - second time
NGCOMM
NGCOMM########################################################################

/*
 * This allows developers to over-ride the values of any of the pre-defined
 * make symbols on a project bases - even if they are using the installed
 * version of ymake. These values can be over-ridden from the YMAKEDEVFILE
 */
#ifdef	_LOCAL_CONF
NGCOMM########################################################################
NGCOMM
NGCOMM Including _LOCAL_CONF
NGCOMM
NGCOMM########################################################################
#include _LOCAL_CONF
NGCOMM########################################################################
NGCOMM
NGCOMM After Including _LOCAL_CONF
NGCOMM
NGCOMM########################################################################
#endif
/*
 * This allows developers to over-ride the values of any of the pre-defined
 * make symbols on a global bases - even if they are using the installed
 * version of ymake.
 */
#ifdef	YMAKEDEVFILE
NGCOMM########################################################################
NGCOMM
NGCOMM Including YMAKEDEVFILE
NGCOMM
NGCOMM########################################################################
#include YMAKEDEVFILE
NGCOMM########################################################################
NGCOMM
NGCOMM After Including YMAKEDEVFILE
NGCOMM
NGCOMM########################################################################
#endif

/************************************************************************
*									*
*	Now set up generic defaults					*
*									*
************************************************************************/

/*
 * DEFINE dirs for default install
 */

/*
 * For backwards compatibility - set YmakeRoot to NcargRoot if it is defined.
 */
#if	defined(NcargRoot) && !defined(YmakeRoot)
#define	YmakeRoot	NcargRoot
#endif

#ifndef	YmakeRoot
#ifdef	UseInstalled
#define	YmakeRoot	_InstRoot
#define	_IgnoreYmakeRoot
#else
#define	YmakeRoot	/usr/local/ncarg
#endif	/* UseInstalled	*/
#endif	/* YmakeRoot */

#ifndef	BinRoot
#ifndef	_IgnoreYmakeRoot
#define	BinRoot	YmakeRoot/bin
#else
#define	BinRoot	_InstBin
#endif	/* _IgnoreYmakeRoot */
#endif	/* BinRoot */

#ifndef	LibRoot
#ifndef	_IgnoreYmakeRoot
#define LibRoot YmakeRoot/lib
#else
#define	LibRoot	_InstLib
#endif	/* _IgnoreYmakeRoot */
#endif	/* LibRoot */

#ifndef	IncRoot
#ifndef	_IgnoreYmakeRoot
#define	IncRoot	YmakeRoot/include
#else
#define	IncRoot	_InstInc
#endif	/* _IgnoreYmakeRoot */
#endif	/* IncRoot */

#ifndef	ManRoot
#ifndef	_IgnoreYmakeRoot
#define	ManRoot	YmakeRoot/man
#else
#define	ManRoot	_InstMan
#endif	/* _IgnoreYmakeRoot */
#endif	/* ManRoot */

#ifndef	TmpRoot
#ifdef	UseInstalled
#define	TmpRoot	_InstTmp
#else
#define	TmpRoot	/tmp
#endif
#endif	/* TmpRoot */

/*
 * Define Actual Install directories.
 */

#ifdef	RootPath
#define	_UseRootPath
#else
#define	RootPath	YmakeRoot
#endif

#ifndef	BinPath
#ifdef	_UseRootPath
#define	BinPath	RootPath/bin
#else
#define	BinPath	BinRoot
#endif
#endif

#ifndef	LibPath
#ifdef	_UseRootPath
#define	LibPath	RootPath/lib
#else
#define	_LibRootEqualPath
#define	LibPath	LibRoot
#endif
#endif

#ifndef	IncPath
#ifdef	_UseRootPath
#define	IncPath	RootPath/include
#else
#define	_IncRootEqualPath
#define	IncPath	IncRoot
#endif
#endif

#ifndef	ManPath
#ifdef	_UseRootPath
#define	ManPath	RootPath/man
#else
#define	ManPath	ManRoot
#endif
#endif

#ifndef	BuildShared

#if	defined(SGI) && ((MAJOR >= 6) || ((MAJOR == 5) && (MINOR >= 3)))
#define	BuildShared
#elif	defined(Linux)
#define	BuildShared
#endif

#else

#if	!BuildShared
#undef	BuildShared
#endif	/* !BuildShared */

#endif	/* BuildShared */

#ifdef	BuildShared
#ifndef	_LIB_FILE

#if	defined(SGI)
#define	_LIB_FILE	"SGILib"
#elif	defined(Linux)
#define	_LIB_FILE	"LinuxLib"
#endif

#else

#if	!_LIB_FILE
#undef	_LIB_FILE
#endif
#endif	/* _LIB_FILE */

#else
#ifdef	_LIB_FILE
#undef	_LIB_FILE
#endif
#endif	/* BuildShared */


#ifndef	XLibrary
#define	XLibrary -lX11
#endif	/* XLibrary */

#ifndef	XextLibrary
#define	XextLibrary	-lXext
#endif	/* XextLibrary */

#ifndef	XToolLibrary
#define	XToolLibrary	-lXt
#endif	/* XToolLibrary */

#ifndef	XMutilLibrary
#define	XMutilLibrary	-lXmu
#endif	/* XMutilLibrary */

#ifndef	XawLibrary
#define	XawLibrary	-lXaw
#endif	/* XawLibrary */

#ifndef XmotifLibrary
#define	XmotifLibrary	-lXm
#endif	/* XmotifLibrary */

#ifndef UseCatDirs
#define	UseCatDirs	NO
#endif	/* UseCatDirs */

#ifndef	MakeProgram
#define	MakeProgram	make
#endif	/* MakeProgram */

#ifndef	CCompiler
#define	CCompiler	gcc
#endif	/* CCompiler */

#ifndef	CxxCompiler
#define	CxxCompiler	g\+\+
#endif	/* CCompiler */

#ifndef CLoader
#define	CLoader	CCompiler
#endif	/* CLoader */

#ifndef	ArchRecLibSearch
#define	ArchRecLibSearch	/**/
#endif

#ifndef	LibSearch
#define LibSearch	ArchRecLibSearch
#endif	/* LibSearch */

#ifndef	LibSearchUser
#define LibSearchUser	/**/
#endif	/* LibSearchUser */

#ifndef	PythonVersion
#define PythonVersion	/**/
#endif	/* PythonVersion */

#ifndef	PythonDir
#define PythonDir	/**/
#endif	/* PythonDir */

#ifndef	PythonBinDir
#define PythonBinDir	/**/
#endif	/* PythonBinDir */

#ifndef	PythonLibSearch
#define PythonLibSearch	/**/
#endif	/* PythonLibSearch */

#ifndef	PythonPkgsDir
#define PythonPkgsDir	/**/
#endif	/* PythonPkgsDir */

#ifndef	PythonIncSearch
#define PythonIncSearch	/**/
#endif	/* PythonIncSearch */

#ifndef	ArchRecIncSearch
#define	ArchRecIncSearch	/**/
#endif

#ifndef	IncSearch
#define IncSearch	ArchRecIncSearch
#endif	/* IncSearch */

#ifndef	Incsearchuser
#define Incsearchuser	/**/
#endif	/* Incsearchuser */

#ifndef	ExtraLibSearch
#define	ExtraLibSearch	/**/
#endif	/* ExtraLibSearch */

#ifndef	ExtraIncSearch
#define	ExtraIncSearch	/**/
#endif	/* ExtraIncSearch */

#ifndef CtoFLibraries
#define CtoFLibraries	/**/
#endif	/* CtoFLibraries */

#ifndef CtoFLibrariesUser
#define CtoFLibrariesUser	/**/
#endif	/* CtoFLibrariesUser */

#ifndef	StdDefines
#define	StdDefines	/**/
#endif	/* StdDefines */

#ifndef	Cdynamic
#define	Cdynamic	/**/
#endif	/* Cdynamic */

#ifndef	Cstatic
#define	Cstatic	/**/
#endif	/* Cstatic */

#ifndef COptimizeFlag
#define COptimizeFlag	-O
#endif	/* COptimizeFlag */

#ifndef	CDebugFlag
#define	CDebugFlag	-g
#endif	/* CDebugFlag */

#ifndef	CcOptions
#define	CcOptions	/**/
#endif	/* CcOptions */

#ifndef	MakeDepend
#define	MakeDepend	makedepend
#endif	/* MakeDepend */

#ifndef	CppCommand
#define	CppCommand	/lib/cpp
#endif	/* CppCommand */

#ifndef	FCppCommand
#define	FCppCommand	$(CONFIG_DIR)/fcpp $(CPP)
#endif	/* FCppCommand */

#ifndef	FCompiler
#define	FCompiler	gfortran
#endif	/* FCompiler */

#ifndef	FLoader
#define	FLoader	FCompiler
#endif	/* FLoader */

#ifndef FOptimizeFlag
#define FOptimizeFlag	-O
#endif	/* FOptimizeFlag */

#ifndef	FDebugFlag
#define	FDebugFlag	-g
#endif	/* FDebugFlag */

#ifndef FcOptions
#define	FcOptions	/**/
#endif	/* FcOptions */

#ifndef	ExeSuffix
#define	ExeSuffix	/**/
#endif	/* ExeSuffix */

#ifndef	LdCommand
#define	LdCommand	ld
#endif	/* LdCommand */

#ifndef	LdRelCommand
#define	LdRelCommand	LdCommand
#endif	/* LdRelCommand */

#ifndef	RpathFlag
#define	RpathFlag	-Wl,-rpath,
#endif

#ifndef	SysSharedLibFlags
#define	SysSharedLibFlags	/**/
#endif

#ifndef	ExtraSysLibraries
#define	ExtraSysLibraries	/**/
#endif	/* ExtraSysLibraries */

#ifndef	ExtraExportFlags
#define	ExtraExportFlags	/**/
#endif	/* ExtraExportFlags */

#ifndef	NgCallF
#define	NgCallF reg\#\#_
#endif	/* NgCallF */

#ifndef	ArCommand
#define	ArCommand	ar
#endif	/* ArCommand */

#ifndef	ArSrcCommand
#define	ArSrcCommand	ar
#endif	/* ArCommand */

#ifndef ArRegOpt
#define	ArRegOpt	vru
#endif	/* ArRegOpt */

#ifndef	ArQuickOpt
#define	ArQuickOpt	q
#endif	/* ArQuickOpt */

#ifndef	LexCommand
#define	LexCommand	flex
#endif	/* LexCommand */

#ifndef	LexLibrary
#define	LexLibrary	-lfl
#endif	/* LexLibrary */

#ifndef	YaccCommand
#define	YaccCommand	yacc
#endif	/* YaccCommand */

#ifndef	RmCommand
#define	RmCommand	rm -f
#endif	/* RmCommand */

#ifndef CatCommand
#define	CatCommand	cat
#endif	/* CatCommand */

#ifndef	CopyCommand
#define	CopyCommand	cp
#endif	/* CopyCommand */

#ifndef	MoveCommand
#define	MoveCommand	mv -f
#endif	/* MoveCommand */

#ifndef	LinkCommand
#define	LinkCommand	ln -s
#endif	/* LinkCommand */

#ifndef	TblCommand
#define	TblCommand	tbl
#endif	/* TblCommand */

#ifndef	NroffCommand
#define	NroffCommand	nroff -man
#endif	/* NroffCommand */

#ifndef	ColCommand
#define	ColCommand	col
#endif	/* ColCommand */

#ifndef	DoesRanlib
#define	DoesRanlib	YES
#endif	/* DoesRanlib */

#if	DoesRanlib
#ifndef	RanLib
#define	RanLib	ranlib
#endif	/* RanLib */
#else	/* DoesRanlib */
#ifndef	RanLib
#define	RanLib	touch -c
#endif	/* RanLib */
#endif	/* DoesRanlib */

#ifndef	NoOptCommand
#define	NoOptCommand	touch -c
#endif	/* NoOptCommand */

#ifndef LintCommand
#define	LintCommand	lint
#endif	/* LintCommand */

#ifndef InstallCommand
#define	InstallCommand	$(CONFIG_DIR)/ymake-install -c
#endif	/* InstallCommand */

#ifndef	InstallRm
#define	InstallRm	$(RM)
#endif	/* InstallRm */

#ifndef	BuildMFLAGS
#define	BuildMFLAGS	NO
#endif

#ifndef	TOPDIR
#define	TOPDIR	.
#endif	/* TOPDIR */

#ifndef CURDIR
#define CURDIR	.
#endif	/* CURDIR */

#ifndef	_YmakeArg1
#define	_YmakeArg1 /**/
#endif	/* _YmakeArg1 */

#ifndef _YmakeArg2
#define _YmakeArg2 /**/
#endif /* _YmakeArg2 */

#ifndef _YmakeArg3
#define _YmakeArg3 /**/
#endif /* _YmakeArg3 */

#ifndef _YmakeArg4
#define _YmakeArg4 /**/
#endif /* _YmakeArg4 */

#ifndef _YmakeArg5
#define _YmakeArg5 /**/
#endif /* _YmakeArg5 */

YMAKEROOT		= YmakeRoot
BINROOT			= BinRoot
LIBROOT			= LibRoot
INCROOT			= IncRoot
MANROOT			= ManRoot
TMPROOT			= TmpRoot

ROOTPATH		= RootPath
BINPATH			= BinPath
LIBPATH			= LibPath
INCPATH			= IncPath
MANPATH			= ManPath

LIBSEARCH		= LibSearch
INCSEARCH		= IncSearch
LIBSEARCHUSER		= LibSearchUser
INCSEARCHUSER		= IncSearchUser
PYTHONVERSION		= PythonVersion
PYTHONLIBSEARCH		= PythonLibSearch
PYTHONINCSEARCH		= PythonIncSearch
PYTHONPKGSDIR           = PythonPkgsDir
PYTHONBINDIR            = PythonBinDir

LIB_SEARCH		= $(LIBSEARCH) ExtraLibSearch
INC_SEARCH		= $(INCSEARCH) ExtraIncSearch

TOP			= TOPDIR
CURRENT_DIR		= CURDIR

BINDIR			= bin
LIBDIR			= lib
INCDIR			= include
MANDIR			= man
DOCDIR			= doc
NGTMPDIR		= tmp
CONFIGDIR		= config

#ifdef	InstallManToLocal
#if	UseCatDirs
MANLPATH		= $(MANPATH)/catl
#else
MANLPATH		= $(MANPATH)/manl
#endif	/* UseCatDirs */

MAN1PATH		= $(MANLPATH)
MAN3PATH		= $(MANLPATH)
MAN5PATH		= $(MANLPATH)
MAN6PATH		= $(MANLPATH)
MAN8PATH		= $(MANLPATH)

MANL_SECTION		= l
MAN1_SECTION		= $(MANL_SECTION)
MAN3_SECTION		= $(MANL_SECTION)
MAN5_SECTION		= $(MANL_SECTION)
MAN6_SECTION		= $(MANL_SECTION)
MAN8_SECTION		= $(MANL_SECTION)

#else	/* InstallManToLocal */

#if	UseCatDirs
MANLPATH		= $(MANPATH)/catl
MAN1PATH		= $(MANPATH)/cat1
MAN3PATH		= $(MANPATH)/cat3
MAN5PATH		= $(MANPATH)/cat5
MAN6PATH		= $(MANPATH)/cat6
MAN8PATH		= $(MANPATH)/cat8
#else	/* UseCatDirs */
MANLPATH		= $(MANPATH)/manl
MAN1PATH		= $(MANPATH)/man1
MAN3PATH		= $(MANPATH)/man3
MAN5PATH		= $(MANPATH)/man5
MAN6PATH		= $(MANPATH)/man6
MAN8PATH		= $(MANPATH)/man8
#endif	/* UseCatDirs */

MANL_SECTION		= l
MAN1_SECTION		= 1
MAN3_SECTION		= 3
MAN5_SECTION		= 5
MAN6_SECTION		= 6
MAN8_SECTION		= 8

#endif	/* InstallManToLocal */

#ifdef	UseInstalled
CONFIG_DIR		= _InstConfig
#else
CONFIG_DIR		= $(CONFIGSRC)
#endif

XLIB			= XLibrary
EXTENSIONLIB		= XextLibrary
XTOOLLIB		= XToolLibrary
XMULIB			= XMutilLibrary
XAWLIB			= XawLibrary
XMOTIFLIB		= XmotifLibrary

XMOTIFCLIENTLIBS	= $(XMOTIFLIB) $(XTOOLLIB) $(XLIB)
XATHENACLIENTLIBS	= $(XAWLIB) $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB)
XMUATHENACLIENTLIBS	= $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(EXTENSIONLIB) $(XLIB)

CTOFLIBS	= CtoFLibraries
CTOFLIBSUSER	= CtoFLibrariesUser
MAKE		= MakeProgram
#if	BuildMFLAGS
MFLAGS		= -$(MAKEFLAGS)
#endif
CC		= CCompiler
CXX		= CxxCompiler
CC_LD		= CLoader
CDYNAMIC	= Cdynamic
CSTATIC		= Cstatic
/*
 *CCOPTIONS	= CcOptions $(EXTRA_CCOPTIONS) -framework OpenCL
 */
CCOPTIONS	= CcOptions $(EXTRA_CCOPTIONS)

BUILDINCDIR	= $(TOP)/include
/*
 * $(TOP) relative to $(BUILDINCDIR)
 */
BUILDINCTOP	= ./..

/*
 * If not useinstalled then -L(libroot) needs to be after the libraries
 * if use installed then it needs to be before the libraries.
 */

#ifdef	_LibRootEqualPath
_LIBROOTSEARCH	=	-L$(LIBROOT)
_EXECLIBSEARCH	=	$(RPATHFLAG)$(TOP)/shared:$(LIBROOT)
_SHLIBSEARCH	=	-rpath $(TOP)/shared:$(LIBROOT)
#else
_LIBROOTSEARCH	=	-L$(LIBPATH) -L$(LIBROOT)
_EXECLIBSEARCH	=	$(RPATHFLAG)$(TOP)/shared:$(LIBPATH):$(LIBROOT)
_SHLIBSEARCH	=	-rpath $(TOP)/shared:$(LIBPATH):$(LIBROOT)
#endif

#ifdef	_IncRootEqualPath
_INCROOTSEARCH	=	-I$(INCROOT)
#else
_INCROOTSEARCH	=	-I$(INCPATH) -I$(INCROOT)
#endif

#ifdef	BuildShared
SYSSHAREDLIBFLAGS =	SysSharedLibFlags
SHAREDLIBSEARCH	=	-L$(TOP)/shared
SHAREDLIBFLAGS	=	$(SYSSHAREDLIBFLAGS) $(_EXECLIBSEARCH) $(SHAREDLIBSEARCH)
SHAREDLDLIBSEARCH = $(DEV_LIB_SEARCH) $(SHAREDLIBSEARCH) $(_LIBROOTSEARCH) $(LIB_SEARCH)
#else
SHAREDLIBFLAGS =
#endif

#ifndef	UseInstalled
TOP_INCLUDES	= -I$(BUILDINCDIR)
LDLIBS		= $(_LIBROOTSEARCH) $(LIB_SEARCH) $(EXTRA_LIBS)
CC_LDOPTIONS	= $(CCOPTIONS) $(COPT) $(XTRA_CLDFLAGS) $(SHAREDLIBFLAGS)
FC_LDOPTIONS	= $(FCOPTIONS) $(FOPT) $(XTRA_FLDFLAGS) $(SHAREDLIBFLAGS)
#else
TOP_INCLUDES	= -I$(BUILDINCDIR) $(DEV_INCLUDES) $(_INCROOTSEARCH)
LDLIBS		= $(LIB_SEARCH) $(EXTRA_LIBS)
CC_LDOPTIONS	= $(CCOPTIONS) $(COPT) $(XTRA_CLDFLAGS) $(DEV_LIB_SEARCH) $(SHAREDLIBFLAGS) $(_LIBROOTSEARCH)
FC_LDOPTIONS	= $(FCOPTIONS) $(FOPT) $(XTRA_FLDFLAGS) $(DEV_LIB_SEARCH) $(SHAREDLIBFLAGS) $(_LIBROOTSEARCH)
#endif
EXTRA_LDLIBS	= $(SYS_LIBS) $(EXTRA_SYS_LIBS) $(DEV_SYS_LIBS)


ALLINCLUDES	= $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INC_SEARCH)
STD_DEFINES	= StdDefines
XTRA_CDEFINES	= $(EXTRA_CDEFINES) $(EXTRA_DEFINES)
ALLDEFINES	= $(ALLINCLUDES) $(DEV_DEFINES) $(XTRA_CDEFINES) $(STD_DEFINES) $(PROJECTDEFINES) $(DEFINES)
CFLAGS		= $(CCOPTIONS) $(COPT) $(ALLDEFINES)
XTRA_CLDFLAGS	= $(EXTRA_CLDFLAGS) $(EXTRA_LDFLAGS)
EXTRA_SYS_LIBS	= ExtraSysLibraries
EXTRA_EXPORT_FLAGS = ExtraExportFlags

DEPEND		= MakeDepend
CPP		= CppCommand
FCPP		= FCppCommand

F77		= FCompiler
F77_LD		= FLoader
FCOPTIONS	= FcOptions $(EXTRA_FCOPTIONS)
NGCALLF = NgCallF

EXE_SUFFIX	= ExeSuffix

XTRA_FDEFINES	= $(EXTRA_FDEFINES) $(EXTRA_DEFINES)
FFLAGS	= $(FCOPTIONS) $(FOPT) $(XTRA_FDEFINES)
XTRA_FLDFLAGS	= $(EXTRA_FLDFLAGS) $(EXTRA_LDFLAGS)

LD		= LdCommand
LD_REL		= LdRelCommand
RPATHFLAG	= RpathFlag
AR		= ArCommand
AR_SRC		= ArSrcCommand
AR_SRC_QUICK	= $(AR_SRC) ArQuickOpt
AR_SRC_CHECK	= $(AR_SRC) ArRegOpt
AR_REG		= $(AR) ArRegOpt
AR_QUICK	= $(AR) ArQuickOpt

RM		= RmCommand
LEX		= LexCommand
YACC		= YaccCommand
LEXLIB		= LexLibrary
CAT		= CatCommand
CP		= CopyCommand
MV		= MoveCommand
LN		= LinkCommand
RANLIB		= RanLib
NO_OPT		= NoOptCommand
TBL		= TblCommand
NROFF		= NroffCommand
COL		= ColCommand

LINT		= LintCommand
INSTALL		= InstallCommand
INSTALL_RM	= InstallRm

INSTALL_BIN	= 0755
INSTALL_MAN	= 0644
INSTALL_DOC	= 0644
INSTALL_APP	= 0644
INSTALL_LIB	= 0644
INSTALL_DB	= 0644
INSTALL_INC	= 0644

CONFIGSRC	= $(TOP)/$(CONFIGDIR)
NEWCONFIGSRC	= ../$(CONFIGSRC)

_YMAKE_EXTRA	= _YmakeArg1 _YmakeArg2 _YmakeArg3 _YmakeArg4 _YmakeArg5

#ifdef	UseInstalled
YMAKE		= ymake $(_YMAKE_EXTRA)
NEWYMAKE	= $(YMAKE)
YMAKEDEP	=
#else
YMAKE		= $(CONFIGSRC)/ymake -config $(CONFIGSRC) $(_YMAKE_EXTRA)
NEWYMAKE	= $(NEWCONFIGSRC)/ymake -config $(NEWCONFIGSRC) $(_YMAKE_EXTRA)
YMAKEDEP	= $(CONFIGSRC)/ymake-filter
#endif
SHELL		= /bin/sh
CALLCONV	= $(CONFIG_DIR)/callconv
MKDIRHIER	= mkdir -p

#ifdef	_NO_PROJECT_FILE
NGCOMM########################################################################
NGCOMM
NGCOMM Not Including a Project file : -noproject was specified to ymake.
NGCOMM
NGCOMM########################################################################
#else
#ifdef	_PROJECT_FILE
NGCOMM########################################################################
NGCOMM
NGCOMM Including _PROJECT_FILE file
NGCOMM
NGCOMM########################################################################
#include _PROJECT_FILE
NGCOMM########################################################################
NGCOMM
NGCOMM After Including _PROJECT_FILE file
NGCOMM
NGCOMM########################################################################
#else
NGCOMM########################################################################
NGCOMM
NGCOMM Including Project file
NGCOMM
NGCOMM########################################################################
#include "Project"
NGCOMM########################################################################
NGCOMM
NGCOMM After Including Project file
NGCOMM
NGCOMM########################################################################
#endif
#endif	/* _NO_PROJECT_FILE */

#ifdef	_LIB_FILE
NGCOMM########################################################################
NGCOMM
NGCOMM Including Lib file
NGCOMM
NGCOMM########################################################################
#include _LIB_FILE
NGCOMM########################################################################
NGCOMM
NGCOMM After Including Lib file
NGCOMM
NGCOMM########################################################################
#endif

NGCOMM########################################################################
NGCOMM
NGCOMM Including Rules file
NGCOMM
NGCOMM########################################################################
#include "Rules"
NGCOMM########################################################################
NGCOMM
NGCOMM After Including Rules file
NGCOMM
NGCOMM########################################################################

.SUFFIXES: .f.sed .xml .shtml

.f.sed.o:
	@$(FCPP) $< $*.f
	$(F77) $(FFLAGS) -c $*.f
	@$(RM) $*.f

NGCOMM########################################################################
NGCOMM
NGCOMM	local y(mM)akefile is included HERE.
NGCOMM
NGCOMM########################################################################
#include YMAKEFILE
NGCOMM########################################################################
NGCOMM
NGCOMM	after local y(mM)akefile included.
NGCOMM
NGCOMM########################################################################

NGCOMM########################################################################
NGCOMM
NGCOMM	The Rest of this file is generated from the Template file.
NGCOMM
NGCOMM########################################################################

/*
 * Disable Optimization for a given yMakefile
 */
#ifdef	DisableOptimize
#ifdef	COptimizeFlag
#undef	COptimizeFlag
#endif	/* COptimizeFlag */
#define	COptimizeFlag	/**/
#ifdef	FOptimizeFlag
#undef	FOptimizeFlag
#endif	/* FOptimizeFlag */
#define	FOptimizeFlag	/**/
#endif	/* DisableOptimize */

/*
 * Turn on/off Debuging in a given yMakefile
 */

#ifndef COptOrDebugFlag
#ifdef	DEBUG
#define COptOrDebugFlag CDebugFlag
#else
#define COptOrDebugFlag COptimizeFlag
#endif	/* DEBUG */
#endif	/* COptOrDebugFlag */

#ifndef FOptOrDebugFlag
#ifdef	DEBUG
#define FOptOrDebugFlag FDebugFlag
#else
#define FOptOrDebugFlag FOptimizeFlag
#endif	/* DEBUG */
#endif	/* FOptOrDebugFlag */

COPT	= COptOrDebugFlag
FOPT	= FOptOrDebugFlag


#ifdef	IHaveSubdirs
InternalMakeSubdirs($(SUBDIRS))
#else
all:: all-local
#endif


clean-local::
	@echo "cleaning in $(CURRENT_DIR)"

CleanFilesTarget(core Makefile.bak)

InternalMakefileTarget

all-local::

install-local::
	@echo "installing in $(CURRENT_DIR)"

depend-local::

includes-local::

preformatted-local::

#ifdef	IHaveSubdirs

InternalInstallSubdirs($(SUBDIRS))
InternalMakefilesSubdirs($(SUBDIRS))
InternalCleanSubdirs($(SUBDIRS))
InternalDistCleanSubdirs($(SUBDIRS))
InternalDependSubdirs($(SUBDIRS))
InternalIncludesSubdirs($(SUBDIRS))
FormatManPagesSubdirs($(SUBDIRS))

#else	/* IHaveSubdirs */

install:: install-local

Makefiles::

includes:: includes-local

depend:: depend-local

clean:: clean-local

dist-clean:: clean-local
	@$(RM) Makefile
	@echo "dist-clean in $(CURRENT_DIR)"

preformatted:: preformatted-local

#endif	/* IHaveSubdirs */
