From cd316b6485c7fa42096dc81a4614c588ef0c03f9 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 3 Jun 1993 11:52:55 +0000 Subject: [PATCH] Lots of changes to bring Imake.tmpl closer to the X11 standard git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2582 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/Imake.tmpl | 602 ++++++++++++++++++++++++++++-------------- 1 file changed, 401 insertions(+), 201 deletions(-) diff --git a/src/config/Imake.tmpl b/src/config/Imake.tmpl index 660f925c1..126d35812 100644 --- a/src/config/Imake.tmpl +++ b/src/config/Imake.tmpl @@ -2,29 +2,22 @@ * generic imake template */ -/**/# $Source$ -/**/# $Author$ -/**/# $Id$ -/**/# - -/**/########################################################################### -/**/# Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE -/**/# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim 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). -/**/# - - +#ifndef XCOMM +#define XCOMM # +#endif +XCOMM ------------------------------------------------------------------------- +XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE +XCOMM $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ +XCOMM +XCOMM Platform-specific parameters may be set in the appropriate .cf +XCOMM configuration files. Site-specific parameters should be set in the file +XCOMM site.def. Full rebuilds are recommended if any parameters are changed. +XCOMM +XCOMM If your C preprocessor does not define any unique symbols, you will need +XCOMM to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing +XCOMM "make World" the first time). +XCOMM + #define YES 1 #define NO 0 @@ -33,28 +26,21 @@ * 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 config/imake.c and rebuild imake with the + * does not have any built in, you will need to add the symbol to the + * cpp_argv table in config/imakemdep.h and rebuild imake with the * BOOTSTRAPCFLAGS variable set (see the macII for an example). * - * [ignore this for now...no makedepend with Kerberos V5 (yet...)] * 2. Add all machine-specific cpp symbols (either defined by you or by * the preprocessor or compiler) to the predefs table in - * config/makedepend/main.c. + * config/imakemdep.h. * * 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. See - * existing .cf files for examples of what to put there. + * 4. Create a .cf file with the name given by MacroFile. */ -#ifdef tahoe -#define TahoeArchitecture -#endif - - #ifdef ultrix #define MacroIncludeFile #define MacroFile ultrix.cf @@ -77,11 +63,6 @@ #define VaxArchitecture #endif -#if defined(tahoe) && !defined(SYSV) -#define MacroIncludeFile -#define MacroFile tahoebsd.cf -#endif - #ifdef sun #define MacroIncludeFile #define MacroFile sun.cf @@ -114,7 +95,22 @@ #define MacroIncludeFile #define MacroFile sony.cf #undef sony +#undef sony_news #define SonyArchitecture +#ifdef mc68020 +#undef mc68020 +#undef mc68030 +#define Mc68020Architecture +#endif +#ifdef mips +#undef mips +#define MipsArchitecture +#endif +#if !defined(bsd43) || defined(SYSTYPE_SYSV) +#define SonySysvArchitecture +#else +#define SonyBsdArchitecture +#endif #endif /* sony */ #ifdef M4310 @@ -143,7 +139,6 @@ #define MacroIncludeFile #define MacroFile cray.cf #undef cray -#undef CRAY #define CrayArchitecture #endif /* CRAY */ @@ -163,23 +158,19 @@ #define StellarArchitecture #endif - -/* - * A convenience for people running on rt's since they define ibm032, and for - * people running AIX (note that AOS will no longer be supported by IBM). - */ -#if defined(ibm032) && !defined(ibm) -#define ibm +#ifdef linux +#define MacroIncludeFile +#define MacroFile linux.cf +#undef linux +#define LinuxArchitecture #endif -#if defined(aix) && !defined(ibm) -#define ibm -#endif - -#if defined(ibm) +#if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix) #define MacroIncludeFile #define MacroFile ibm.cf +#ifdef ibm #undef ibm +#endif #define IBMArchitecture #ifdef i386 #undef i386 @@ -193,13 +184,84 @@ #undef aix #define AIXArchitecture #endif +#ifdef _IBMR2 +#undef _IBMR2 +#define RsArchitecture +#endif #endif /* ibm */ - +#ifdef luna +#undef luna +#define MacroIncludeFile +#define MacroFile luna.cf +#ifdef mc68000 +#undef mc68000 +#define Mc68000Architecture +#else +#undef mc88000 +#define Mc88000Architecture +#endif +#endif + +#ifdef Mips +# define MacroIncludeFile "Mips.cf" +# define MacroFile Mips.cf +# undef Mips +# if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43) +# define MipsBsdArchitecture +# else /* BSD */ +# define MipsSysvArchitecture +# endif /* BSD */ +#endif /* Mips */ + +#ifdef MOTOROLA +# define MacroIncludeFile +# define MacroFile moto.cf +# undef MOTOROLA +# ifdef SYSV +# define MotoR3Architecture +# endif +# ifdef SVR4 +# define MotoR4Architecture +# endif +#endif /* MOTOROLA */ + +#ifdef SYSV386 +# define MacroIncludeFile +# define MacroFile x386.cf +# ifdef SVR4 +# define i386SVR4Architecture +# else +# define i386SVR3Architecture +# endif +#endif /* SYSV386 */ + +#ifdef DGUX +#define MacroIncludeFile +#define MacroFile DGUX.cf +#undef DGUX +#define DguxArchitecture +#endif + +#ifdef __convex__ +# define MacroIncludeFile +# define MacroFile convex.cf +# ifdef convex +# undef convex +# endif +# define ConvexArchitecture +#endif + +#ifdef NeXT +#define MacroIncludeFile +#define MacroFile next.cf +#undef NeXT +#define NeXTArchitecture +#endif #ifndef MacroIncludeFile -/**/# WARNING: Imake.tmpl not configured; guessing at definitions!!! -/**/# This might mean that BOOTSTRAPCFLAGS wasn't set when building imake. +XCOMM WARNING: Imake.tmpl not configured; guessing at definitions!!! +XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake. #define MacroIncludeFile #define MacroFile generic.cf #endif @@ -211,24 +273,76 @@ *****************************************************************************/ -/**/########################################################################### -/**/# platform-specific configuration parameters - edit MacroFile to change +XCOMM ------------------------------------------------------------------------- +XCOMM site-specific configuration parameters that need to come before +XCOMM the platform-specific parameters - edit site.def to change +#define BeforeVendorCF +#include +#undef BeforeVendorCF + +XCOMM ------------------------------------------------------------------------- +XCOMM platform-specific configuration parameters - edit MacroFile to change #include MacroIncludeFile -/**/########################################################################### -/**/# site-specific configuration parameters - edit site.def to change +/* It is a kludge to put these two macros here, + * but Project.tmpl needs them and it is not clear there is a better place. + */ + +/* + * Concat - concatenates two strings. + */ +#ifndef Concat +#if __STDC__ && !defined(UnixCpp) +#define ConcatX(a,b)a##b +#define Concat(a,b) ConcatX(a,b) +#else +#define Concat(a,b)a/**/b +#endif +#endif + +/* + * Concat3 - concatenates three strings. + */ +#ifndef Concat3 +#if __STDC__ && !defined(UnixCpp) +#define Concat3X(a,b,c)a##b##c +#define Concat3(a,b,c) Concat3X(a,b,c) +#else +#define Concat3(a,b,c)a/**/b/**/c +#endif +#endif + +/* + * Concat4 - concatenates four strings. + */ +#ifndef Concat4 +#if __STDC__ && !defined(UnixCpp) +#define Concat4X(a,b,c,d)a##b##c##d +#define Concat4(a,b,c,d) Concat4X(a,b,c,d) +#else +#define Concat4(a,b,c,d)a/**/b/**/c/**/d +#endif +#endif + +XCOMM ------------------------------------------------------------------------- +XCOMM site-specific configuration parameters that go after +XCOMM the platform-specific parameters - edit site.def to change +#define AfterVendorCF #include +#undef AfterVendorCF /* * defaults for various generic parameters; set in site.def if needed */ +#ifndef HasSharedLibraries +#define HasSharedLibraries NO +#endif #ifndef SystemV -#ifdef SYSV -#define SystemV YES /* need system 5 style */ -#else -#define SystemV NO /* bsd */ +#define SystemV NO /* SYSV (R3) */ #endif +#ifndef SystemV4 +#define SystemV4 NO /* SVR4 */ #endif #ifndef OSMajorVersion #define OSMajorVersion 0 @@ -240,7 +354,7 @@ #define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */ #endif #ifndef ExecableScripts -#ifdef SYSV +#if SystemV #define ExecableScripts NO #else #define ExecableScripts YES /* kernel exec() can handle #! */ @@ -262,8 +376,8 @@ #define HasLargeTmp NO /* be paranoid */ #endif #ifndef HasSockets -#if SystemV -#define HasSockets NO /* not yet... */ +#if SystemV || SystemV4 +#define HasSockets NO /* do not assume it has them */ #else #define HasSockets YES /* bsd does have them */ #endif @@ -279,18 +393,10 @@ #define HasPutenv NO /* assume not */ #endif #ifndef HasVoidSignalReturn -#if SystemV -#define HasVoidSignalReturn YES -#else -#define HasVoidSignalReturn NO /* may or may not be true */ -#endif +#define HasVoidSignalReturn YES /* assume yes */ #endif #ifndef HasBsearch -#if SystemV -#define HasBsearch YES -#else -#define HasBsearch NO /* stupid systems */ -#endif +#define HasBsearch YES /* assume yes */ #endif #ifndef HasSaberC #define HasSaberC NO /* for people unclear on the concept */ @@ -301,57 +407,69 @@ #ifndef HasNdbm #define HasNdbm NO #endif -#ifndef HasDESLibrary -#define HasDESLibrary NO /* if you have any DES library */ +#ifndef HasSecureRPC +#define HasSecureRPC NO /* if you have Secure RPC */ +#endif +#ifndef HasShm +#if SystemV || SystemV4 +#define HasShm YES +#else +#define HasShm NO +#endif +#endif +#ifndef NeedConstPrototypes +#define NeedConstPrototypes NO +#endif +#ifndef NeedVarargsPrototypes +#define NeedVarargsPrototypes NO +#endif +#ifndef NeedNestedPrototypes +#define NeedNestedPrototypes NO #endif #ifndef NeedFunctionPrototypes -#define NeedFunctionPrototypes NO +#define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes) #endif #ifndef NeedWidePrototypes #define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */ #endif -#ifndef HasSunOSSharedLibraries -#define HasSunOSSharedLibraries NO +#ifndef StripInstalledPrograms +#define StripInstalledPrograms NO /* leave symbol table just in case */ #endif -#ifndef SharedCodeDef -#if HasSunOSSharedLibraries -#define SharedCodeDef -DSHAREDCODE -#else -#define SharedCodeDef /**/ +#ifndef UsrLibDir +#ifdef ProjectRoot +#define UsrLibDir Concat(ProjectRoot,/lib) +#ifndef AlternateUsrLibDir +#define AlternateUsrLibDir YES #endif +#else +#define UsrLibDir /usr/lib +#ifndef AlternateUsrLibDir +#define AlternateUsrLibDir NO #endif -#ifndef SharedLibraryDef -#if HasSunOSSharedLibraries -#define SharedLibraryDef -DSUNSHLIB /* eventually will be SVR4SHLIB... */ -#ifndef HasSharedLibraries -#define HasSharedLibraries YES #endif #else -#define SharedLibraryDef /**/ -#ifndef HasSharedLibraries -#define HasSharedLibraries NO +#ifndef AlternateUsrLibDir +#define AlternateUsrLibDir YES #endif #endif +#ifndef IncRoot +#ifdef ProjectRoot +#define IncRoot Concat(ProjectRoot,/include) +#ifndef AlternateIncRoot +#define AlternateIncRoot YES +#endif #else -#ifndef HasSharedLibraries -#define HasSharedLibraries NO +#define IncRoot /usr/include +#ifndef AlternateIncRoot +#define AlternateIncRoot NO #endif #endif - -#ifndef StripInstalledPrograms -#define StripInstalledPrograms NO /* leave symbol table just in case */ -#endif - -#ifndef DestDir -#define DestDir /* as nothing */ +#else +#ifndef AlternateIncRoot +#define AlternateIncRoot YES #endif -#ifndef UsrLibDir /* if changed under SunOS with shared */ -#define UsrLibDir $(DESTDIR)/usr/lib /* libs, then need to run ldconfig */ -#endif /* as root */ -#ifndef IncRoot -#define IncRoot $(DESTDIR)/usr/include #endif #ifndef UNCOMPRESSPATH #define UNCOMPRESSPATH /usr/ucb/uncompress @@ -368,26 +486,11 @@ #ifndef DefaultCDebugFlags #define DefaultCDebugFlags OptimizedCDebugFlags #endif -#ifndef LibraryCDebugFlags -#define LibraryCDebugFlags OptimizedCDebugFlags -#endif #ifndef DefaultCCOptions #define DefaultCCOptions /* as nothing: this is for floating point, etc. */ #endif -#ifndef LibraryCCOptions -#define LibraryCCOptions DefaultCCOptions -#endif -#ifndef ServerCCOptions -#define ServerCCOptions DefaultCCOptions -#endif -#ifndef PexCDebugFlags -#define PexCDebugFlags -g -#endif #ifndef InstPgmFlags -#define InstPgmFlags -#endif -#ifndef InstScrFlags -#define InstScrFlags +#define InstPgmFlags -s #endif #ifndef InstBinFlags #define InstBinFlags -m 0755 @@ -396,7 +499,7 @@ #define InstUidFlags -m 4755 #endif #ifndef InstLibFlags -#define InstLibFlags -m 0664 +#define InstLibFlags -m 0644 #endif #ifndef InstIncFlags #define InstIncFlags -m 0444 @@ -411,8 +514,8 @@ #define InstKmemFlags InstUidFlags /* put -g kmem -m 2755 in site.def... */ #endif #ifndef ArCmd -#if HasLargeTmp -#define ArCmd ar cq /* use /tmp for temp files */ +#if HasLargeTmp | SystemV4 +#define ArCmd ar cq /* do nothing special */ #else #define ArCmd ar clq /* use local dir for temp files */ #endif @@ -420,20 +523,27 @@ #ifndef BootstrapCFlags #define BootstrapCFlags /**/ #endif -#ifndef CcCmd -#define CcCmd cc -#endif #ifndef HasGcc #define HasGcc NO #endif -#ifndef ServerCcCmd -#define ServerCcCmd CcCmd +#if DbmGccCompiled +#define GccStructFlags +#else +#define GccStructFlags -fpcc-struct-return +#endif +#ifndef CcCmd +#if HasGcc2 +#define CcCmd gcc GccStructFlags +#else +#if HasGcc +#define CcCmd gcc -fstrength-reduce GccStructFlags +#else +#define CcCmd cc +#endif #endif -#ifndef LibraryCcCmd -#define LibraryCcCmd CcCmd #endif #if HasFortran -#ifndef FortranCmd /* for xgks */ +#ifndef FortranCmd #define FortranCmd f77 #endif #ifndef FortranFlags @@ -456,8 +566,12 @@ #define PreProcessCmd CcCmd -E #endif #ifndef InstallCmd -#if SystemV +#if SystemV | SystemV4 +#ifdef UseInstalled +#define InstallCmd $(BINDIR)/bsdinst /* hack should be in project */ +#else #define InstallCmd $(SCRIPTSRC)/bsdinst.sh /* hack should be in project */ +#endif #else #define InstallCmd install #endif @@ -469,21 +583,21 @@ #define LintCmd lint #endif #ifndef LintLibFlag -#if SystemV +#if SystemV || SystemV4 #define LintLibFlag -o #else #define LintLibFlag -C #endif #endif #ifndef LintOpts -#if SystemV +#if SystemV || SystemV4 #define LintOpts -ax #else #define LintOpts -axz #endif #endif #ifndef CpCmd -#define CpCmd cp -p +#define CpCmd cp #endif #ifndef LnCmd #if SystemV @@ -498,7 +612,14 @@ #ifndef MvCmd #define MvCmd mv #endif -#if !defined(RanlibCmd) && !SystemV +#ifndef DoRanlibCmd +#if SystemV || SystemV4 +#define DoRanlibCmd 0 +#else +#define DoRanlibCmd 1 +#endif +#endif +#ifndef RanlibCmd #define RanlibCmd ranlib #endif #ifndef RanlibInstFlags @@ -507,12 +628,8 @@ #ifndef RmCmd #define RmCmd rm -f #endif -#ifndef StandardCppDefines -#if SystemV -#define StandardCppDefines -DSYSV -#else -#define StandardCppDefines /**/ -#endif +#ifndef AwkCmd +#define AwkCmd awk #endif #ifndef StandardIncludes #define StandardIncludes /**/ /* for platform-specifics */ @@ -521,11 +638,18 @@ #if SystemV #define StandardDefines -DSYSV #else +#if SystemV4 +#define StandardDefines -DSVR4 +#else #define StandardDefines /**/ #endif #endif -#ifndef SaberDefines -#define SaberDefines /**/ +#endif +#ifndef StandardCppDefines +#define StandardCppDefines StandardDefines +#endif +#ifndef Malloc0ReturnsNull +#define Malloc0ReturnsNull NO #endif #ifndef NdbmDefines #if HasNdbm @@ -535,52 +659,77 @@ #endif #endif #ifndef ExtraLibraries +#if SystemV4 +#if HasSockets +#define ExtraLibraries -lsocket -lnsl +#else +#define ExtraLibraries -lnsl +#endif +#else #define ExtraLibraries /**/ #endif +#endif #ifndef ExtraLoadFlags #define ExtraLoadFlags /**/ #endif #ifndef LdCombineFlags +#if SystemV4 +#define LdCombineFlags -r +#else #define LdCombineFlags -X -r #endif -#ifndef LdLibLocations -#define LdLibLocations /**/ -#endif -#ifndef CompatibilityFlags -#define CompatibilityFlags /**/ #endif #ifndef TagsCmd #define TagsCmd ctags #endif -#ifndef EtagsCmd -#define EtagsCmd etags -#endif #ifndef LoaderLibPrefix #define LoaderLibPrefix /**/ /* cray does -l libX11.a */ #endif +#ifndef DependFlags +#define DependFlags /**/ +#endif +#ifndef TroffCmd +#define TroffCmd psroff +#endif +#ifndef MsMacros +#define MsMacros -ms +#endif +#ifndef TblCmd +#define TblCmd tbl +#endif +#ifndef EqnCmd +#define EqnCmd eqn +#endif +#ifndef ExpandManNames +#if SystemV +#define ExpandManNames NO +#else +#define ExpandManNames YES +#endif +#endif #ifndef TOPDIR #define TOPDIR . #endif #ifndef CURDIR #define CURDIR . #endif +#ifndef ExtraFilesToClean +#define ExtraFilesToClean /**/ +#endif #ifndef FilesToClean #define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut #endif #ifndef STDCTopIncludes #define STDCTopIncludes /**/ #endif -#ifndef MakeDependFlags -#define MakeDependFlags /**/ -#endif #ifdef SourceTop - SRCDIR = SourceTop/CURDIR/ + SRCDIR = Concat4(SourceTop,/,CURDIR,/) #ifdef Use_VPATH - VPATH = SourceTop/CURDIR + VPATH = Concat3(SourceTop,/,CURDIR) #endif SRCTOP = SourceTop - SRCINCLUDE = -I/**/SourceTop/CURDIR + SRCINCLUDE = Concat4(-I,$(SRCTOP),/,CURDIR) #endif SHELL = BourneShell @@ -588,8 +737,9 @@ CURRENT_DIR = CURDIR AR = ArCmd - BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp doesn't have uniq sym */ + BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */ CC = CcCmd + AS = AsCmd #if HasFortran FC = FortranCmd FDEBUGFLAGS = FortranDebugFlags @@ -600,21 +750,26 @@ PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */ INSTALL = InstallCmd LD = LdCmd - LDLOCATIONS = LdLibLocations LINT = LintCmd LINTLIBFLAG = LintLibFlag LINTOPTS = LintOpts LN = LnCmd +#ifdef LdLibLocations + LDLOCATIONS = LdLibLocations +#endif MAKE = MakeCmd MV = MvCmd CP = CpCmd -#ifdef RanlibCmd + AWK = AwkCmd +#if DoRanlibCmd RANLIB = RanlibCmd -#else - RANLIB = \: -#endif RANLIBINSTFLAGS = RanlibInstFlags +#endif RM = RmCmd + TROFF = TroffCmd + MSMACROS = MsMacros + TBL = TblCmd + EQN = EqnCmd STD_INCLUDES = StandardIncludes STD_CPP_DEFINES = StandardCppDefines STD_DEFINES = StandardDefines @@ -635,12 +790,52 @@ STDC_TOP_INCLUDES = STDCTopIncludes #if !HasVoidSignalReturn SIGNAL_DEFINES = -DSIGNALRETURNSINT #endif +/* + * The following supports forcing of function prototypes + */ +#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes +#define _funcprotodef -DFUNCPROTO=15 +#else +#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes +#define _funcprotodef -DFUNCPROTO=11 +#else +#if NeedFunctionPrototypes && NeedNestedPrototypes +#define _funcprotodef -DFUNCPROTO=9 +#else +#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes +#define _funcprotodef -DFUNCPROTO=7 +#else +#if NeedFunctionPrototypes && NeedConstPrototypes +#define _funcprotodef -DFUNCPROTO=5 +#else +#if NeedFunctionPrototypes && NeedVarargsPrototypes +#define _funcprotodef -DFUNCPROTO=3 +#else +#if NeedFunctionPrototypes +#define _funcprotodef -DFUNCPROTO +#else +#define _funcprotodef /**/ +#endif +#endif +#endif +#endif +#endif +#endif +#endif +#if NeedWidePrototypes +#define _wideprotodef /**/ +#else +#define _wideprotodef -DNARROWPROTO +#endif + PROTO_DEFINES = _funcprotodef _wideprotodef +#undef _funcprotodef +#undef _wideprotodef + #if StripInstalledPrograms - INSTPGMFLAGS = InstPgmFlags -s /* install flags for stripping */ + INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */ #else - INSTPGMFLAGS = InstPgmFlags /* install flags without stripping */ + INSTPGMFLAGS = #endif - INSTSCRFLAGS = InstScrFlags /* install flags without stripping */ INSTBINFLAGS = InstBinFlags /* install flags for programs */ INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */ INSTLIBFLAGS = InstLibFlags /* install flags for libraries */ @@ -649,69 +844,75 @@ STDC_TOP_INCLUDES = STDCTopIncludes INSTDATFLAGS = InstDatFlags /* install flags for data files */ INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */ - DESTDIR = DestDir /* root of install */ +#ifdef ProjectRoot + PROJECTROOT = ProjectRoot +#endif #ifdef UseInstalled +#if AlternateIncRoot TOP_INCLUDES = -I$(INCROOT) /* def: for alternative /usr/include */ +#endif #else TOP_INCLUDES = -I$(TOP) /* def: for builds within tree */ #endif CDEBUGFLAGS = DefaultCDebugFlags CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */ - COMPATFLAGS = CompatibilityFlags /* * STD_INCLUDES contains system-specific includes * TOP_INCLUDES specifies how to get to /usr/include or its build substitute * EXTRA_INCLUDES contains project-specific includes set in project incfiles * INCLUDES contains client-specific includes set in Imakefile + * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile */ - ALLINCLUDES = $(INCLUDES) $(STD_INCLUDES) $(TOP_INCLUDES) $(EXTRA_INCLUDES) - ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS) + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) +#if AlternateUsrLibDir && !defined(UseInstalled) + LDLIBS = -L$(USRLIBDIR) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) +#else LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) - LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LDLOCATIONS) +#endif +#if AlternateUsrLibDir && defined(UseInstalled) + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) \ + $(LDLOCATIONS) -L$(USRLIBDIR) +#else + LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) $(LDLOCATIONS) +#endif LDCOMBINEFLAGS = LdCombineFlags - MDFLAGS = MakeDependFlags + DEPENDFLAGS = DependFlags MACROFILE = MacroFile - RM_CMD = $(RM) FilesToClean + RM_CMD = $(RM) FilesToClean ExtraFilesToClean IMAKE_DEFINES = /* leave blank, for command line use only */ -#ifdef UseInstalled - IRULESRC = $(CONFIGDIR) /* used in rules file */ - IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) -#else - IRULESRC = $(CONFIGSRC) #ifdef UseImakeInstalled + IRULESRC = $(CONFIGSRC) /* used in rules file */ IMAKE_CMD = $(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES) #else + IRULESRC = $(CONFIGSRC) IMAKE_CMD = $(NEWTOP)$(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES) -#endif #endif ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) - /* * get project-specific configuration and rules */ #include - - #include -/**/########################################################################### -/**/# start of Imakefile +XCOMM ------------------------------------------------------------------------- +XCOMM start of Imakefile #include INCLUDE_IMAKEFILE -/**/########################################################################### -/**/# common rules for all Makefiles - do not edit +XCOMM ------------------------------------------------------------------------- +XCOMM 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. + * all is to make sure that an empty Imakefile does not default to make clean. */ emptyrule:: @@ -728,17 +929,16 @@ MakefileAdditions() #if HasSaberC saber: - /**/#load $(ALLDEFINES) $(SABER_DEFINES) $(SRCS) - /**/#setopt load_flags $(ALLDEFINES) $(SABER_DEFINES) + XCOMM load $(ALLDEFINES) $(SRCS) osaber: - /**/#load $(ALLDEFINES) $(OBJS) + XCOMM load $(ALLDEFINES) $(OBJS) #endif #ifdef IHaveSubdirs -/**/########################################################################### -/**/# rules for building in SUBDIRS - do not edit +XCOMM ------------------------------------------------------------------------- +XCOMM rules for building in SUBDIRS - do not edit InstallSubdirs($(SUBDIRS)) InstallManSubdirs($(SUBDIRS)) @@ -749,8 +949,8 @@ IncludesSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) #else -/**/########################################################################### -/**/# empty rules for directories that do not have SUBDIRS - do not edit +XCOMM ------------------------------------------------------------------------- +XCOMM empty rules for directories that do not have SUBDIRS - do not edit install:: @echo "install in $(CURRENT_DIR) done" @@ -764,5 +964,5 @@ includes:: #endif /* if subdirectory rules are needed */ -/**/########################################################################### -/**/# dependencies generated by makedepend +XCOMM ------------------------------------------------------------------------- +XCOMM dependencies generated by makedepend -- 2.26.2