1XCOMM ----------------------------------------------------------------------
2XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
3XCOMM $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $
4XCOMM $XdotOrg: xc/config/cf/Imake.tmpl,v 1.9 2005/01/24 06:37:31 daniels Exp $
5XCOMM
6XCOMM
7XCOMM
8XCOMM
9XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $
10XCOMM ----------------------------------------------------------------------
11
12/*
13 * generic imake template
14 */
15
16/*
17 * Modify Imake.cf when adding a new architecture, do not modify this file.
18 * Platform-specific parameters may be set in the appropriate <vendor>.cf
19 * configuration files.  Site-specific parameters should be set in the file
20 * site.def.  Full rebuilds are recommended if any parameters are changed.
21 * If your C preprocessor does not define any unique symbols, you will need
22 * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
23 * "make World" the first time).
24 */
25
26#define ImakeConfigRelease 6
27
28#define	YES	1
29#define NO	0
30
31/* Ensure that "all" is the default target in the Makefile. */
32all::
33
34.SUFFIXES: .i
35
36/* Intercept clean rules for current directory */
37#undef clean
38#define clean cleandir
39
40#include <Imake.cf>
41
42XCOMM -----------------------------------------------------------------------
43XCOMM site-specific configuration parameters that need to come before
44XCOMM the platform-specific parameters - edit site.def to change
45#define BeforeVendorCF
46#include <site.def>
47#undef BeforeVendorCF
48
49#if defined(HasGcc3) && !defined(HasGcc2)
50# define HasGcc2 HasGcc3
51#endif
52#if defined(HasGcc2) && !defined(HasGcc)
53# define HasGcc HasGcc2
54#endif
55
56#ifndef HasCenterLineC
57#define HasCenterLineC NO
58#endif
59#ifndef HasCenterLineCplusplus
60#define HasCenterLineCplusplus NO
61#endif
62
63#ifndef HasClearmake
64# define HasClearmake NO
65#endif
66
67#ifndef ProPoliceSupport
68#define ProPoliceSupport NO
69#endif
70
71/*
72 * ClearmakeOSName - insert the current OS type into the clearmake
73 * build script, so .o files from different platforms cannot be winked in.
74 * If clearmake finds the build script for two .o files is the same, it
75 * will share the .o, even across different architectures.  Inserting the
76 * O/S name into the build script in a comment prevents unwanted sharing.
77 * Note the trailing double-@ in the macro: end a line using this macro
78 * with backslash without the double-@ usually used.
79 * Like this:
80 *
81 * #define SomeRule() @@\
82 *     something or other @@\
83 *     ClearmakeOSName \
84 *     something else @@\
85 *     and more
86 */
87#ifndef ClearmakeOSName
88# if HasClearmake
89#  define ClearmakeOSName @ XCOMM $(OSNAME) @@
90# else
91#  define ClearmakeOSName /**/
92# endif
93#endif
94
95#if HasClearmake
96# ifndef MakeCmd
97#  define MakeCmd clearmake
98# endif
99#endif
100
101#if HasClearmake
102XCOMM ----------------------------------------------------------------------
103.c.o:
104	ClearmakeOSName	$(CC) -c $(CFLAGS) $*.c
105#endif
106
107XCOMM ----------------------------------------------------------------------
108XCOMM platform-specific configuration parameters - edit MacroFile to change
109#include MacroIncludeFile
110
111XCOMM ----------------------------------------------------------------------
112XCOMM site-specific configuration parameters that go after
113XCOMM the platform-specific parameters - edit site.def to change
114#define AfterVendorCF
115#include <site.def>
116#undef AfterVendorCF
117
118/*
119 * defaults for various generic parameters; set in site.def if needed
120 */
121
122/* the following are needed before we can include Imake.rules */
123
124#ifndef NothingOutsideProjectRoot
125#define NothingOutsideProjectRoot NO
126#endif
127
128#ifndef RemoveObsoleteFiles
129#define RemoveObsoleteFiles YES
130#endif
131
132#ifndef HasVarDirectory
133#define HasVarDirectory		YES
134#endif
135#ifndef UseEtcX11
136#define UseEtcX11		YES
137#endif
138#ifndef UseInstalledX11
139# define UseInstalledX11        NO
140#endif
141#ifdef UseInstalled
142# undef UseInstalledX11
143# define UseInstalledX11        YES
144#endif
145#if NothingOutsideProjectRoot
146#undef UseEtcX11
147#define UseEtcX11		NO
148#endif
149#ifndef UseSeparateConfDir
150#define UseSeparateConfDir	(UseEtcX11 || HasVarDirectory)
151#endif
152#if NothingOutsideProjectRoot
153#undef UseSeparateConfDir
154#define UseSeparateConfDir	NO
155#endif
156#ifndef SystemV
157#define SystemV			NO	/* SYSV (R3) */
158#endif
159#ifndef SystemV4
160#define SystemV4		NO	/* SVR4 */
161#endif
162#ifndef HasCodeCenter
163#define HasCodeCenter		NO
164#endif
165#ifndef HasSentinel
166#define HasSentinel		NO
167#endif
168#ifndef HasPurify
169#define HasPurify		NO
170#endif
171#ifndef HasTestCenter
172#define HasTestCenter		NO
173#endif
174#ifndef HasGnuMake
175#define HasGnuMake		NO
176#endif
177/*
178 * The following fixes a glitch with GNU make -j
179 */
180#ifndef ForceServerRemake
181#define ForceServerRemake	HasGnuMake
182#endif
183#ifndef HasBsdMake
184#define HasBsdMake		NO
185#endif
186#ifndef HasParallelMake
187#define HasParallelMake		NO
188#endif
189#ifndef RemoveTargetProgramByMoving
190#define RemoveTargetProgramByMoving NO
191#endif
192#ifndef DoRanlibCmd
193#if SystemV || SystemV4
194#define DoRanlibCmd NO
195#else
196#define DoRanlibCmd YES
197#endif
198#endif
199#ifndef ExecableScripts
200#if SystemV
201#define ExecableScripts		NO
202#else
203#define ExecableScripts		YES	/* kernel exec() can handle #! */
204#endif
205#endif
206
207#ifndef HasMakefileSafeInclude	    /* -include or sinclude in a Makefile */
208#if HasClearmake || HasBsdMake
209#define HasMakefileSafeInclude	YES
210#else
211#define HasMakefileSafeInclude	NO   /* see also vendor-specific .cf files */
212#endif
213#endif
214
215#ifndef HasSymLinks
216#define HasSymLinks YES
217#endif
218
219#ifndef HasPerl
220#define HasPerl			YES
221#endif
222
223#ifndef HasPerl5
224#define HasPerl5		HasPerl
225#endif
226
227#ifndef PerlCmd
228#define PerlCmd			perl
229#endif
230
231#ifndef PerlOptions
232#define PerlOptions		/**/
233#endif
234
235#ifndef PerlEnvSetup
236#define PerlEnvSetup		env LC_ALL=C
237#endif
238
239#ifndef BuildRman
240#define BuildRman 		NO
241#endif
242
243#ifndef HasGperf
244#define HasGperf		NO
245#endif
246
247#ifndef GperfCmd
248#define GperfCmd		gperf
249#endif
250
251#ifndef RmanCmd
252#if BuildRman
253#ifdef UseInstalled		/* assume BINDIR in path */
254#define RmanCmd rman
255#else
256#define RmanCmd $(TOP)/config/util/rman
257#endif
258#endif
259#endif
260
261#ifndef RmanOptions
262#if BuildRman
263#define RmanOptions -f HTML
264#endif
265#endif
266
267#ifndef BuildHtmlManPages
268#ifdef RmanCmd
269#define BuildHtmlManPages YES
270#else
271#define BuildHtmlManPages NO
272#endif
273#endif
274/* Can't do this while bootstrapping imake */
275#ifdef BootStrap
276#undef BuildHtmlManPages
277#define BuildHtmlManPages NO
278#endif
279
280#ifndef DontPreprocessManPages
281#ifdef UseInstalled
282#define DontPreprocessManPages YES
283#else
284#define DontPreprocessManPages NO
285#endif
286#endif
287
288#ifndef CompressManPages
289#define CompressManPages NO
290#endif
291
292#ifndef HasGroff
293#define HasGroff NO
294#endif
295#ifndef HasGroffHtml
296#define HasGroffHtml NO
297#endif
298
299#ifndef HasCookieMaker
300#define HasCookieMaker	NO
301#endif
302
303#ifndef DoLoadableServer
304#define DoLoadableServer NO
305#endif
306#ifndef MakeDllModules
307#define MakeDllModules NO
308#endif
309#ifndef StripInstalledPrograms
310#define StripInstalledPrograms NO	/* leave symbol table just in case */
311#endif
312#ifndef StaticNeedsPicForShared
313#define StaticNeedsPicForShared NO
314#endif
315
316#include <Imake.rules>
317
318#ifndef HasSharedLibraries
319#define HasSharedLibraries NO
320#endif
321#ifndef OSMajorVersion
322#define OSMajorVersion          0
323#endif
324#ifndef OSMinorVersion
325#define OSMinorVersion          0
326#endif
327#ifndef OSTeenyVersion
328#define OSTeenyVersion		0
329#endif
330#ifndef UnalignedReferencesAllowed
331#define UnalignedReferencesAllowed NO	/* if arbitrary deref is okay */
332#endif
333#ifndef AvoidNullMakeCommand
334#if !HasBsdMake
335#define AvoidNullMakeCommand NO
336#else
337#define AvoidNullMakeCommand YES
338#endif
339#endif
340#if AvoidNullMakeCommand
341#ifndef NullMakeCommand
342#define NullMakeCommand		@ echo -n
343#endif
344/*
345 * An obscure bug in BSD4.3's original make causes it not to recognize a
346 * macro definition if the macro name starts with a non-alpha and in
347 * column one.
348 */
349 _NULLCMD_ = NullMakeCommand
350#endif
351
352#ifndef CrossCompiling
353#define CrossCompiling		NO
354#undef  CrossCompileDir
355#endif
356#ifndef BourneShell			/* to force shell in makefile */
357#define BourneShell		/bin/sh
358#endif
359#ifndef ConstructMFLAGS
360#if SystemV
361#define ConstructMFLAGS		YES	/* build MFLAGS from MAKEFLAGS */
362#else
363#define ConstructMFLAGS		NO	/* build MFLAGS from MAKEFLAGS */
364#endif
365#endif
366
367#ifndef ConstructMAKEFLAGS		/* needed on old BSD-based? */
368#define ConstructMAKEFLAGS	NO	/* build MAKEFLAGS from MFLAGS */
369#endif
370
371#ifndef HasLargeTmp
372#define HasLargeTmp		NO	/* be paranoid */
373#endif
374
375#ifndef HasMotif
376#define HasMotif		NO
377#endif
378#ifndef HasMotif2
379#define HasMotif2		NO      /* only if system has working Motif2 or OpenMotif */
380#endif
381#ifndef HasBSDAuth
382#define HasBSDAuth		NO
383#endif
384
385#ifndef HasBSD44Sockets
386#define HasBSD44Sockets		NO
387#endif
388#ifndef HasSockets
389#define HasSockets		YES
390#endif
391#ifndef HasStreams
392#define HasStreams		!HasSockets
393#endif
394#ifndef HasDECnet
395#define HasDECnet		NO
396#endif
397#ifndef HasPoll
398#if SystemV || SystemV4
399#define HasPoll			YES
400#else
401#define HasPoll			NO
402#endif
403#endif
404#ifndef HasVFork
405#if SystemV
406#define HasVFork		NO	/* not yet... */
407#else
408#define HasVFork		YES
409#endif
410#endif
411#ifndef HasSetProcTitle
412#define HasSetProcTitle		NO
413#endif
414#ifndef HasSetUserContext
415#define HasSetUserContext	NO
416#endif
417#ifndef HasLibCrypt
418#define HasLibCrypt		NO
419#endif
420#ifndef HasPutenv
421#define HasPutenv		NO	/* assume not */
422#endif
423/* setenv(3) and unsetenv(3) */
424#ifndef HasSetenv
425#define HasSetenv		YES	/* assume yes */
426#endif
427#ifndef HasVoidSignalReturn
428#define HasVoidSignalReturn	YES	/* assume yes */
429#endif
430#ifndef HasBsearch
431#define HasBsearch		YES	/* assume yes */
432#endif
433#ifndef HasSnprintf
434#define HasSnprintf		NO	/* assume not */
435#endif
436#ifndef HasStrlcat
437#define HasStrlcat		NO	/* assume not */
438#endif
439#ifndef HasDlopen
440#define HasDlopen		NO	/* assume not */
441#endif
442#ifndef HasWeakSymbols
443#define HasWeakSymbols		NO	/* assume not */
444#endif
445#ifndef HasIssetugid
446#define HasIssetugid		NO	/* assume not */
447#endif
448#ifndef HasGetresuid
449#define HasGetresuid		NO	/* assume not */
450#endif
451#ifndef HasMkstemp
452#define HasMkstemp		NO	/* assume not */
453#endif
454#ifndef HasUsableFileMmap
455#define HasUsableFileMmap	NO	/* assume not */
456#endif
457#ifndef HasGetIfAddrs
458#define HasGetIfAddrs		NO	/* assume not */
459#endif
460#ifndef HasStickyDirBit
461#define HasStickyDirBit		YES
462#endif
463#ifndef HasFchown
464#define HasFchown		YES
465#endif
466#ifndef HasPam
467#define HasPam			NO
468#endif
469#ifndef HasPamMisc
470#define HasPamMisc		NO
471#endif
472#ifndef HasGetpeereid
473#define HasGetpeereid		NO
474#endif
475#ifndef HasGetpeerucred
476#define HasGetpeerucred		NO
477#endif
478#ifndef NoStrstr
479#define NoStrstr		NO
480#endif
481#ifndef HasShadowPasswd
482#define HasShadowPasswd		NO
483#endif
484#ifndef HasBasename
485#define HasBasename		YES
486#endif
487#ifndef HasGetopt
488# if !defined(Win32Architecture) && !defined(OS2Architecture)
489#  define HasGetopt		YES
490# else
491#  define HasGetopt		NO
492# endif
493#endif
494#ifndef HasGetoptLong
495# define HasGetoptLong		NO
496#endif
497/* byte-order defaults */
498#ifndef ByteOrder
499#if defined(VaxArchitecture)
500#define ByteOrder		X_LITTLE_ENDIAN
501#elif defined(MipsArchitecture) && defined(MipselArchitecture)
502#define ByteOrder		X_LITTLE_ENDIAN
503#elif defined(MipsArchitecture)
504#define ByteOrder		X_BIG_ENDIAN
505#elif defined(i386Architecture)
506#define ByteOrder		X_LITTLE_ENDIAN
507#elif defined(ia64Architecture)
508#define ByteOrder		X_LITTLE_ENDIAN
509#elif defined(AMD64Architecture)
510#define ByteOrder		X_LITTLE_ENDIAN
511#elif defined(SparcArchitecture) || defined(Sparc64Architecture)
512#define ByteOrder		X_BIG_ENDIAN
513#elif defined(AlphaArchitecture)
514#define ByteOrder		X_LITTLE_ENDIAN
515#elif defined(Mc68000Architecture)
516#define ByteOrder		X_BIG_ENDIAN
517#elif defined(Mc68020Architecture)
518#define ByteOrder		X_BIG_ENDIAN
519#elif defined(Mc88000Architecture)
520#define ByteOrder		X_BIG_ENDIAN
521#elif defined(s390Architecture)
522#define ByteOrder		X_BIG_ENDIAN
523#elif defined(s390xArchitecture)
524#define ByteOrder		X_BIG_ENDIAN
525#elif defined(Arm32ebArchitecture)
526#define ByteOrder		X_BIG_ENDIAN
527#elif defined(Arm32Architecture)
528#define ByteOrder		X_LITTLE_ENDIAN
529#elif defined(RsArchitecture)
530#define ByteOrder		X_BIG_ENDIAN
531#elif defined(PpcArchitecture) || defined(Ppc64Architecture)
532#define ByteOrder		X_BIG_ENDIAN
533#elif defined(HPArchitecture)
534#define ByteOrder		X_BIG_ENDIAN
535#elif defined(SuperHArchitecture)
536#define ByteOrder		X_LITTLE_ENDIAN
537#elif defined(SuperHebArchitecture)
538#define ByteOrder		X_BIG_ENDIAN
539#endif
540#endif /* ByteOrder */
541X_BYTE_ORDER = ByteOrder
542
543#ifndef HasFortran
544#define HasFortran		NO
545#endif
546#ifndef HasGcc2ForCplusplus
547#define HasGcc2ForCplusplus	NO
548#endif
549#ifndef HasCplusplus
550#if HasGcc2ForCplusplus
551#define HasCplusplus		YES
552#else
553#define HasCplusplus		NO
554#endif
555#endif
556#ifndef HasMktemp
557#define HasMktemp		NO	/* if you have the mktemp command */
558#endif
559#ifndef HasNdbm
560#define HasNdbm			NO
561#endif
562#ifndef HasSecureRPC
563#define HasSecureRPC		NO	/* if you have Secure RPC */
564#endif
565#ifndef HasKrbIV
566#define HasKrbIV		NO	/* if you have Kerberos IV */
567#endif
568#ifndef HasKrb5
569#define HasKrb5			NO      /* if you have Kerberos V5 */
570#endif
571#ifndef HasLatex
572#define HasLatex		NO
573#endif
574#ifndef HasShm
575#if SystemV || SystemV4
576#define HasShm			YES
577#else
578#define HasShm			NO
579#endif
580#endif
581#ifndef HasCbrt
582#define HasCbrt			YES
583#endif
584#ifndef HasFfs
585#define HasFfs			YES
586#endif
587#ifndef HasZlib
588#define HasZlib			YES
589#endif
590#ifndef OsNeedZlibHeaders
591#define OsNeedZlibHeaders	!HasZlib
592#endif
593#if !HasZlib		/* if OS doesn't have it, we'll build it */
594XCOMM Building your own zlib can be a harmful security risk and is
595XCOMM deprecated; please strongly consider using vendor-supplied packages.
596#undef GzipLibrary	/* GzipLibrary was valid only if HasZlib */
597#endif
598#ifndef GzipLibrary	/* if OS config didn't define it, assume it's -lz */
599#define GzipLibrary -lz
600#endif
601/* If the system has the Freetype2 library - if NO, the copy in extras is built */
602#ifndef HasFreetype2
603#define HasFreetype2		YES
604#endif
605/* If the system has the Fontconfig library - if NO, the copy in extras is built  */
606#ifndef HasFontconfig
607#define HasFontconfig		NO
608#endif
609/* If the system has the PNG library - if NO, xcursorgen is not built */
610#ifndef HasLibpng
611#define HasLibpng		NO
612#endif
613#if HasKrbIV
614#ifndef KrbIVIncludes
615#define KrbIVIncludes /**/
616#endif
617#ifndef KrbIVLibraries
618#define KrbIVLibraries -lkrb -ldes
619#endif
620#endif
621#if HasKrb5
622#ifndef Krb5Includes
623#define Krb5Includes -I/krb5/include
624#endif
625#ifndef Krb5Libraries
626#define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
627#endif
628#else
629#undef Krb5Includes
630#define Krb5Includes /**/
631#undef Krb5Libraries
632#define Krb5Libraries /**/
633#endif
634#ifndef UseGnuMalloc
635#define UseGnuMalloc		NO
636#endif
637#ifndef GnuMallocLibrary
638#define GnuMallocLibrary -lgmalloc
639#endif
640#ifndef MallocLibraries
641#if UseGnuMalloc
642#define MallocLibraries	GnuMallocLibrary
643#else
644#define MallocLibraries	/**/
645#endif
646#endif
647#ifndef HasPosixRegex		/* Most modern platforms have it */
648#define HasPosixRegex		YES
649#endif
650#ifndef RegexLibrary
651#if HasPosixRegex
652#define RegexLibrary		/**/
653#else
654#define RegexLibrary		-lregex
655#endif
656#endif
657#ifndef HasNCurses
658#define HasNCurses		NO
659#endif
660#ifndef NCursesLibName
661#if HasNCurses
662#define NCursesLibName	-lncurses
663#else
664#define NCursesLibName
665#endif
666#endif
667#ifdef NCursesLibDir
668NCURSESLIBDIR = NCursesLibDir
669#endif
670#ifdef NCursesIncDir
671NCURSESINCDIR = NCursesIncDir
672#endif
673#ifndef HasGlide2
674#define HasGlide2 NO
675#endif
676#ifndef Glide2IncDir
677#if HasGlide2
678#define Glide2IncDir /usr/include/glide
679#else
680#define Glide2IncDir
681#endif
682#endif
683GLIDE2INCDIR = Glide2IncDir
684#ifndef HasGlide3
685#define HasGlide3 NO
686#endif
687#ifndef Glide3IncDir
688#if HasGlide3
689#define Glide3IncDir /usr/include/glide3
690#else
691#define Glide3IncDir
692#endif
693#endif
694GLIDE3INCDIR = Glide3IncDir
695#ifndef Glide3LibName
696#if HasGlide3
697#define Glide3LibName glide3
698#else
699#define Glide3LibName
700#endif
701#endif
702GLIDE3LIBNAME = Glide3LibName
703#ifndef HasTk
704#define HasTk NO
705#endif
706#ifndef TkLibName
707#if HasTk
708#define TkLibName tk
709#else
710#define TkLibName
711#endif
712#endif
713TKLIBNAME = TkLibName
714#ifndef TkLibDir
715#if HasTk
716#define TkLibDir /usr/local/lib
717#else
718#define TkLibDir
719#endif
720#endif
721TKLIBDIR = TkLibDir
722#ifndef TkIncDir
723#if HasTk
724#define TkIncDir /usr/local/include
725#else
726#define TkIncDir
727#endif
728#endif
729#ifndef TkLibrary
730#ifdef HasTk
731#define TkLibrary Concat(-L,$(TKLIBDIR)) Concat(-l,$(TKLIBNAME))
732#else
733#define TkLibrary
734#endif
735#endif
736#ifndef HasTcl
737#define HasTcl NO
738#endif
739#ifndef TclLibName
740#if HasTcl
741#define TclLibName tcl
742#else
743#define TclLibName
744#endif
745#endif
746TCLLIBNAME = TclLibName
747#ifndef TclLibDir
748#if HasTcl
749#define TclLibDir /usr/local/lib
750#else
751#define TclLibDir
752#endif
753#endif
754TCLIBDIR = TclLibDir
755#ifndef TclIncDir
756#if HasTcl
757#define TclIncDir /usr/local/include
758#else
759#define TclIncDir
760#endif
761#endif
762#ifndef TclLibrary
763#ifdef HasTcl
764#define TclLibrary Concat(-L,$(TCLLIBDIR)) Concat(-l,$(TCLLIBNAME))
765#else
766#define TclLibrary
767#endif
768#endif
769#ifndef HasTsLib
770#define HasTsLib NO
771#endif
772/*
773 * Libtool has two different behaviours for version numbers.
774 * On platforms which support a minor number, the library
775 * version is (version - minor).minor, on those that don't,
776 * the version if version.0.  Linux and Darwin support minor
777 * numbers; some BSDs do as well.  Set this to YES if libtool
778 * uses minor numbers on your platform.
779 */
780#ifndef LibtoolMinorVersions
781#define LibtoolMinorVersions	NO
782#endif
783#ifndef NeedConstPrototypes
784#define NeedConstPrototypes	NO
785#endif
786#ifndef NeedVarargsPrototypes
787#define NeedVarargsPrototypes	NO
788#endif
789#ifndef NeedNestedPrototypes
790#define NeedNestedPrototypes	NO
791#endif
792#ifndef NeedFunctionPrototypes
793#define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
794#endif
795#ifndef NeedWidePrototypes
796#define NeedWidePrototypes	YES	/* mix and match ANSI-C, non-ANSI */
797#endif
798
799#ifndef UseCCMakeDepend			/* use slow cc -E script */
800#define UseCCMakeDepend NO
801#endif
802#ifndef UseGccMakeDepend		/* use slowish but correct gcc -M */
803#define UseGccMakeDepend NO
804#endif
805
806#ifndef CaseSensitiveFileSystem
807#define CaseSensitiveFileSystem YES
808#endif
809
810/* DefaultUsrBin is independent of ProjectRoot.
811   This is a directory where programs will be found even if PATH
812   is not set, for example when coming in remotely via rsh. */
813#ifndef DefaultUsrBin
814#define	DefaultUsrBin /usr/bin
815#endif
816
817#ifndef LibDirName
818# define LibDirName lib
819#endif
820
821#ifndef UsrLibDir
822#ifdef ProjectRoot
823#define UsrLibDir Concat3(ProjectRoot,/,LibDirName)
824#ifndef AlternateUsrLibDir
825#define AlternateUsrLibDir YES
826#endif
827#else
828#define UsrLibDir Concat3(/usr,/,LibDirName)
829#ifndef AlternateUsrLibDir
830#define AlternateUsrLibDir NO
831#endif
832#endif
833#else
834#ifndef AlternateUsrLibDir
835#define AlternateUsrLibDir YES
836#endif
837#endif
838#ifndef VarDirectory
839#ifdef ProjectVar
840#define VarDirectory ProjectVar
841#else
842#define VarDirectory /var
843#endif
844#endif
845#ifndef VarLibDir
846#define VarLibDir $(VARDIR)/lib
847#endif
848
849/*
850 * SystemUsrLibDir is independent of ProjectRoot.  It is used primarily
851 * to allow links for shared libraries in /usr/lib for compliance to
852 * various standards (e.g., Linux/OpenGL).
853 */
854#ifndef SystemUsrLibDir
855#define SystemUsrLibDir /usr/LibDirName
856#endif
857#ifndef SystemUsrIncDir
858#define SystemUsrIncDir /usr/include
859#endif
860
861#ifndef ShLibDir
862#define ShLibDir UsrLibDir
863#endif
864#ifndef IncRoot
865#ifdef ProjectRoot
866#define IncRoot Concat(ProjectRoot,/include)
867#ifndef AlternateIncRoot
868#define AlternateIncRoot YES
869#endif
870#else
871#define IncRoot /usr/include
872#ifndef AlternateIncRoot
873#define AlternateIncRoot NO
874#endif
875#endif
876#else
877#ifndef AlternateIncRoot
878#define AlternateIncRoot YES
879#endif
880#endif
881#ifndef LintlibDir
882#define LintlibDir $(USRLIBDIR)/lint
883#endif
884#ifndef SystemManDirectory
885#if SystemV4
886#define SystemManDirectory /usr/share/man
887#else
888#define SystemManDirectory /usr/man
889#endif
890#endif
891#ifndef ManDirectoryRoot
892#ifdef ProjectRoot
893#define ManDirectoryRoot Concat(ProjectRoot,/man)
894#else
895#define ManDirectoryRoot SystemManDirectory
896#endif
897#endif
898#ifndef ManPath
899#define ManPath ManDirectoryRoot
900#endif
901#ifndef ManSourcePath
902#define ManSourcePath $(MANPATH)/man
903#endif
904#ifndef ManDir
905#define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
906#endif
907#ifndef LibmanDir
908#define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
909#endif
910#ifndef FileManDir
911#define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
912#endif
913#ifndef MiscManDir
914#define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
915#endif
916#ifndef DriverManDir
917#define DriverManDir $(MANSOURCEPATH)$(DRIVERMANSUFFIX)
918#endif
919#ifndef AppLoadDefs
920#define AppLoadDefs -D__apploaddir__=$(XAPPLOADDIR)
921#endif
922#ifndef AppManDefs
923#define AppManDefs -D__appmansuffix__=$(MANSUFFIX)
924#endif
925#ifndef LibManDefs
926#define LibManDefs -D__libmansuffix__=$(LIBMANSUFFIX)
927#endif
928#ifndef FileManDefs
929#define FileManDefs -D__filemansuffix__=$(FILEMANSUFFIX)
930#endif
931#ifndef MiscManDefs
932#define MiscManDefs -D__miscmansuffix__=$(MISCMANSUFFIX)
933#endif
934#ifndef DriverManDefs
935#define DriverManDefs -D__drivermansuffix__=$(DRIVERMANSUFFIX)
936#endif
937#ifndef AdminManDefs
938#define AdminManDefs -D__adminmansuffix__=$(ADMINMANSUFFIX)
939#endif
940#ifndef ProjectManDefs
941#define ProjectManDefs -D__projectroot__=$(PROJECTROOT)
942#endif
943#ifndef XConfigFileManDefs
944#define XConfigFileManDefs -D__xconfigfile__=$(XCONFIGFILE)
945#endif
946#ifndef XConfigDirManDefs
947#define XConfigDirManDefs -D__xconfigdir__=$(XCONFIGDIR)
948#endif
949#ifndef XLogFileManDefs
950#define XLogFileManDefs -D__xlogfile__=$(XLOGFILE)
951#endif
952#ifndef XServerManDefs
953#define XServerManDefs -D__xservername__=$(XSERVERNAME)
954#endif
955
956#ifndef CompressManCmd
957#define CompressManCmd gzip -n
958#endif
959
960#ifndef HtmlIndexCmd
961#if BuildHtmlManPages
962#define HtmlIndexCmd $(MKHTMLINDEX)
963#endif
964#endif
965
966#ifndef LogDirectory
967#if HasVarDirectory
968#define LogDirectory $(VARDIR)/log
969#else
970#define LogDirectory /usr/adm
971#endif
972#endif
973
974#ifndef HasVarRun
975#define HasVarRun NO
976#endif
977
978#ifndef VarRunDirectory
979#if HasVarRun
980#define VarRunDirectory $(VARDIR)/run
981#endif
982#endif
983
984#ifndef HasVarDb
985#define HasVarDb NO
986#endif
987
988#ifndef VarDbDirectory
989#if HasVarDb
990#define VarDbDirectory $(VARDIR)/db
991#endif
992#endif
993
994#ifndef ConfigSrc
995#define ConfigSrc $(TOP)/config
996#endif
997#ifndef DependDir
998#if UseCCMakeDepend || UseGccMakeDepend
999#define DependDir $(CONFIGSRC)/util
1000#else
1001#define DependDir $(CONFIGSRC)/makedepend
1002#endif
1003#endif
1004#ifndef UNCOMPRESSPATH
1005#define UNCOMPRESSPATH /usr/ucb/uncompress /* obsolete */
1006#endif
1007#ifndef OptimizedCDebugFlags
1008#define OptimizedCDebugFlags -O
1009#endif
1010#ifndef OptimizedCplusplusDebugFlags
1011#define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
1012#endif
1013#ifndef DebuggableCDebugFlags
1014#define DebuggableCDebugFlags -g
1015#endif
1016#ifndef DebuggableCplusplusDebugFlags
1017#define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
1018#endif
1019#ifndef ProfiledCDebugFlags
1020#define ProfiledCDebugFlags -pg
1021#endif
1022#ifndef ProfiledCplusplusDebugFlags
1023#define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
1024#endif
1025#ifndef NoOpCDebugFlags
1026#define NoOpCDebugFlags /**/
1027#endif
1028#ifndef DefaultCDebugFlags
1029#define DefaultCDebugFlags OptimizedCDebugFlags
1030#endif
1031#ifndef DefaultCplusplusDebugFlags
1032#define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
1033#endif
1034#ifndef DefaultCCOptions
1035#define DefaultCCOptions /* floating point, etc. */
1036#endif
1037#ifndef DefaultCplusplusOptions
1038#define DefaultCplusplusOptions /* floating point, etc. */
1039#endif
1040#ifndef HardCodeLibdirFlag
1041#define HardCodeLibdirFlag	/**/
1042#endif
1043#ifndef NoRConst
1044#define NoRConst NO /* YES if const for structs of funcs is bad */
1045#endif
1046#ifndef InstPgmFlags
1047# if CrossCompiling
1048#  define InstPgmFlags
1049# else
1050#  define InstPgmFlags -s
1051# endif
1052#endif
1053#ifndef InstBinFlags
1054#define InstBinFlags -m 0755
1055#endif
1056#ifndef InstUidFlags
1057#define InstUidFlags -m 4711
1058#endif
1059#ifndef InstLibFlags
1060#define InstLibFlags -m 0644
1061#endif
1062#ifndef InstIncFlags
1063#define InstIncFlags -m 0444
1064#endif
1065#ifndef InstManFlags
1066#define InstManFlags -m 0444
1067#endif
1068#ifndef InstDatFlags
1069#define InstDatFlags -m 0444
1070#endif
1071#ifndef InstKmemFlags     /* put -g kmem -m 2711 in site.def... */
1072#define InstKmemFlags InstUidFlags
1073#endif
1074#ifndef ParallelMakeFlags
1075#define ParallelMakeFlags /**/
1076#endif
1077#ifndef ArCmdBase
1078#define ArCmdBase ar
1079#endif
1080#ifndef ArCmd
1081#if HasLargeTmp || SystemV4 || HasGnuAr
1082#define ArCmd ArCmdBase cq
1083#else
1084#define ArCmd ArCmdBase clq
1085#endif
1086#endif
1087#ifndef ArAddCmd
1088#if HasLargeTmp || SystemV4 || HasGnuAr
1089#define ArAddCmd ArCmdBase ru
1090#else
1091#define ArAddCmd ArCmdBase rul
1092#endif
1093#endif
1094#ifndef ArExtCmd
1095#if HasLargeTmp || SystemV4 || HasGnuAr
1096#define ArExtCmd ArCmdBase x
1097#else
1098#define ArExtCmd ArCmdBase xl
1099#endif
1100#endif
1101#ifndef BootstrapCFlags
1102#define BootstrapCFlags /**/
1103#endif
1104#ifndef HasGcc3
1105#define HasGcc3 NO
1106#endif
1107#ifndef HasGcc2
1108#define HasGcc2 HasGcc3
1109#endif
1110#ifndef HasGcc
1111#define HasGcc HasGcc2
1112#endif
1113#ifndef HasIntelC
1114#define HasIntelC NO
1115#endif
1116#ifndef HasSunC
1117#define HasSunC NO
1118#endif
1119#ifndef HasBrokenCCForLink
1120#define HasBrokenCCForLink NO
1121#endif
1122#ifndef CcCmd
1123#if HasGcc2
1124#define CcCmd gcc -fpcc-struct-return
1125#else
1126#if HasGcc
1127#define CcCmd gcc -fstrength-reduce -fpcc-struct-return
1128#else
1129#if HasCenterLineC
1130#define CcCmd clcc
1131#else
1132#define CcCmd cc
1133#endif
1134#endif
1135#endif
1136#endif
1137#ifndef CplusplusCmd
1138#if HasGcc2ForCplusplus
1139#define CplusplusCmd g++
1140#else
1141#define CplusplusCmd CC
1142#endif
1143#endif
1144#ifndef CplusplusFilt
1145# define CplusplusFilt	c++filt
1146#endif
1147#ifndef CplusplusLibC
1148#if HasGcc2ForCplusplus
1149#define CplusplusLibC	-lstdc++
1150#else
1151#define CplusplusLibC /**/
1152#endif
1153#endif
1154#ifndef CplusplusStandardDefines
1155#define CplusplusStandardDefines StandardDefines
1156#endif
1157#ifndef CplusplusExtraDefines
1158#define CplusplusExtraDefines /**/
1159#endif
1160#ifndef CplusplusExtraIncludes
1161#define CplusplusExtraIncludes /**/
1162#endif
1163#ifndef CplusplusDependIncludes
1164#define CplusplusDependIncludes /**/
1165#endif
1166#ifndef CplusplusOptions
1167#define CplusplusOptions DefaultCplusplusOptions
1168#endif
1169#ifndef CplusplusSpecialOptions
1170#define CplusplusSpecialOptions /**/
1171#endif
1172#if HasFortran
1173#ifndef FortranCmd
1174#define FortranCmd f77
1175#endif
1176#ifndef FortranFlags
1177#define FortranFlags /**/
1178#endif
1179#ifndef FortranDebugFlags	/* for -O or -g */
1180#define FortranDebugFlags /**/
1181#endif
1182#endif
1183#ifndef AsCmd
1184#define AsCmd as
1185#endif
1186#ifndef AsmDefines
1187#define AsmDefines /**/
1188#endif
1189#ifndef CompressCmd
1190#define CompressCmd compress
1191#endif
1192#ifndef GzipCmd
1193#define GzipCmd gzip -n
1194#endif
1195#ifndef CppCmd
1196#define CppCmd /LibDirName/cpp
1197#endif
1198#ifndef RawCppCmd
1199#define RawCppCmd CppCmd -undef
1200#endif
1201#ifndef CppNoLineInfoOption
1202#define CppNoLineInfoOption /**/
1203#endif
1204#ifndef PreProcessCmd
1205#define PreProcessCmd CcCmd -E
1206#endif
1207#ifndef InstallCmd		/* hack should be in project */
1208#if SystemV || SystemV4
1209#ifdef UseInstalled		/* assume BINDIR in path */
1210#define InstallCmd bsdinst
1211#else
1212#define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
1213#endif
1214#else
1215#define InstallCmd install
1216#endif
1217#endif
1218#ifndef InstallFlags
1219#define InstallFlags -c
1220#endif
1221#ifndef StripCmd
1222#define StripCmd strip
1223#endif
1224#ifndef LdCmd
1225#define LdCmd ld
1226#endif
1227#ifndef M4Cmd
1228#define M4Cmd m4
1229#endif
1230#ifndef M4Flags
1231#define M4Flags /**/
1232#endif
1233#ifndef LexCmd
1234#define LexCmd lex
1235#endif
1236#ifndef LexLib
1237#define LexLib -ll
1238#endif
1239#ifndef HasFlex
1240#define HasFlex NO
1241#endif
1242#ifndef YaccCmd
1243#define YaccCmd yacc
1244#endif
1245#ifndef CplusplusYaccCmd
1246#define CplusplusYaccCmd YaccCmd
1247#endif
1248#ifndef LintCmd
1249#define LintCmd lint
1250#endif
1251#ifndef LintLibFlag
1252#if SystemV || SystemV4
1253#define LintLibFlag -o
1254#else
1255#define LintLibFlag -C
1256#endif
1257#endif
1258#ifndef LintOpts
1259#if SystemV || SystemV4
1260#define LintOpts -bh
1261#else
1262#define LintOpts -axz
1263#endif
1264#endif
1265#ifndef CpCmd
1266#define CpCmd cp
1267#endif
1268#ifndef LnCmd /* can use cp instead of ln if necessary */
1269#if HasSymLinks
1270#define LnCmd ln -s
1271#else
1272#define LnCmd ln
1273#endif
1274#endif
1275#ifndef MakeCmd
1276#define MakeCmd make
1277#endif
1278#ifndef MvCmd
1279#define MvCmd mv -f
1280#endif
1281#ifndef RanlibCmd
1282#define RanlibCmd ranlib
1283#endif
1284#ifndef RanlibInstFlags
1285#define RanlibInstFlags /**/
1286#endif
1287#ifndef RmCmd
1288#define RmCmd rm -f
1289#endif
1290
1291/*
1292 * Module cross-compile stuff.  By default they are defined to be exactly the
1293 * same as the non-module versions.
1294 */
1295#ifndef ModuleCcCmd
1296#define ModuleCcCmd CcCmd
1297#endif
1298#ifndef ModuleCppCmd
1299#define ModuleCppCmd CppCmd
1300#endif
1301#ifndef ModuleCFlags
1302#define ModuleCFlags $(CFLAGS)
1303#endif
1304#ifndef ModuleAsCmd
1305#define ModuleAsCmd AsCmd
1306#endif
1307#ifndef ModuleAsFlags
1308#define ModuleAsFlags /**/
1309#endif
1310#ifndef ModuleLdCmd
1311#define ModuleLdCmd LdCmd
1312#endif
1313#ifndef ModuleLdFlags
1314#define ModuleLdFlags /**/
1315#endif
1316#ifndef ModuleLdCombineFlags
1317#define ModuleLdCombineFlags LdCombineFlags
1318#endif
1319#ifndef ModuleArCmd
1320#define ModuleArCmd ArCmd
1321#endif
1322#ifndef NeedModuleRanlib
1323#define NeedModuleRanlib NO
1324#endif
1325#ifndef ModuleRanlibCmd
1326#define ModuleRanlibCmd RanlibCmd
1327#endif
1328
1329#ifndef HostCcCmd
1330#define HostCcCmd cc
1331#endif
1332#ifndef StandardIncludes	/* for platform-specifics */
1333#define StandardIncludes /**/
1334#endif
1335#ifndef StandardDefines
1336#if SystemV
1337#define StandardDefines -DSYSV
1338#else
1339#if SystemV4
1340#define StandardDefines -DSVR4
1341#else
1342#define StandardDefines /**/
1343#endif
1344#endif
1345#endif
1346#ifndef StandardCppOptions
1347#define StandardCppOptions /**/
1348#endif
1349#ifndef StandardCppDefines
1350#define StandardCppDefines StandardCppOptions StandardDefines
1351#endif
1352#ifndef Malloc0ReturnsNull
1353#if UseGnuMalloc
1354#define Malloc0ReturnsNull YES
1355#else
1356#define Malloc0ReturnsNull NO
1357#endif
1358#endif
1359#if Malloc0ReturnsNull
1360#ifndef Malloc0ReturnsNullDefines
1361#define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
1362#endif
1363#endif
1364#ifndef ToolkitStringsABIOptions
1365#define ToolkitStringsABIOptions /**/
1366#endif
1367#ifndef NdbmDefines
1368#if HasNdbm
1369#define NdbmDefines -DNDBM
1370#else
1371#define NdbmDefines /**/
1372#endif
1373#endif
1374#ifndef HasLdRunPath
1375#define HasLdRunPath NO
1376#endif
1377#ifndef LdPreLib
1378# if !defined(UseInstalled)
1379#  define LdPreLib -L$(BUILDLIBDIR)
1380# else
1381# if AlternateUsrLibDir
1382#  define LdPreLib -L$(USRLIBDIR)
1383# else
1384# define LdPreLib /**/
1385# endif
1386#endif
1387#endif
1388#ifndef LdPostLib
1389#if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath && !defined(CrossCompileDir)
1390#define LdPostLib -L$(USRLIBDIR)
1391#else
1392#define LdPostLib /**/
1393#endif
1394#endif
1395#ifndef MathLibrary
1396#define MathLibrary -lm
1397#endif
1398#ifndef DBMLibrary
1399#define DBMLibrary -ldbm
1400#endif
1401#ifndef DlLibrary
1402#define DlLibrary -ldl
1403#endif
1404#ifndef ExtraLibraries
1405#if SystemV4
1406#if HasSockets
1407#define ExtraLibraries -lsocket -lnsl -lw
1408#else
1409#define ExtraLibraries -lnsl -lw
1410#endif
1411#else
1412#define ExtraLibraries /**/
1413#endif
1414#endif
1415#ifndef ExtraLoadOptions
1416#define ExtraLoadOptions /**/
1417#endif
1418#ifndef ExtraLoadFlags
1419#define ExtraLoadFlags /**/
1420#endif
1421#ifndef LdCombineFlags
1422#if SystemV4
1423#define LdCombineFlags -r
1424#else
1425#define LdCombineFlags -X -r
1426#endif
1427#endif
1428#ifndef LdStripFlags
1429#define LdStripFlags -x
1430#endif
1431#ifndef TagsCmd
1432#define TagsCmd ctags
1433#endif
1434#ifndef LoaderLibPrefix
1435#define LoaderLibPrefix /**/
1436#endif
1437#ifndef ImakeCmd
1438#ifdef UseInstalled		/* assume BINDIR in path */
1439#define ImakeCmd imake
1440#else
1441#define ImakeCmd $(IMAKESRC)/imake
1442#endif
1443#endif
1444#ifndef ImakeWarningFlags
1445#define ImakeWarningFlags	/* Nothing */
1446#endif
1447#ifndef DependCmd
1448#if UseGccMakeDepend
1449#ifdef UseInstalled		/* assume BINDIR in path */
1450#define DependCmd gccmakedep
1451#else
1452#define DependCmd $(DEPENDSRC)/gccmakedep
1453#endif
1454#elif UseCCMakeDepend
1455#ifdef UseInstalled		/* assume BINDIR in path */
1456#define DependCmd ccmakedep
1457#else
1458#define DependCmd $(DEPENDSRC)/ccmakedep
1459#endif
1460#else
1461#ifdef UseInstalled		/* assume BINDIR in path */
1462#define DependCmd makedepend
1463#else
1464#define DependCmd $(DEPENDSRC)/makedepend
1465#endif
1466#endif
1467#endif
1468#ifndef DependDefines
1469# if UseCCMakeDepend || UseGccMakeDepend
1470#  define DependDefines /**/
1471# else
1472#  define DependDefines -DUSE_MAKEDEPEND
1473# endif
1474#endif
1475#ifndef DependFlags
1476#define DependFlags /**/
1477#endif
1478#ifndef DependFileName
1479#if !HasBsdMake
1480#define DependFileName Makefile.dep
1481#else
1482#define DependFileName .depend
1483#endif
1484#endif
1485#ifndef ExportListCmd
1486# ifndef ExportListGenSource
1487#  define ExportListCmd		/**/
1488# elif !defined(UseInstalled)
1489#  define ExportListCmd		$(CONFIGSRC)/util/exportlistgen
1490# else
1491#  define ExportListCmd		exportlistgen
1492# endif
1493#endif
1494#ifndef MkdirHierCmd
1495#ifdef UseInstalled		/* assume BINDIR in path */
1496#define MkdirHierCmd mkdirhier
1497#else
1498#define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
1499#endif
1500#endif
1501#ifndef RevPathCmd
1502#ifdef UseInstalled		/* assume BINDIR in path */
1503#define RevPathCmd revpath
1504#else
1505#define RevPathCmd $(CONFIGSRC)/util/revpath
1506#endif
1507#endif
1508#ifndef TroffCmd
1509#if HasGroff
1510#define TroffCmd groff -Tps
1511#else
1512#define TroffCmd troff -Tps
1513#endif
1514#endif
1515#ifndef NroffCmd
1516#define NroffCmd nroff
1517#endif
1518#ifndef HTMLroffCmd
1519#if HasGroff && HasGroffHtml
1520#define HTMLroffCmd groff -Thtml
1521#endif
1522#endif
1523#ifdef HTMLroffCmd
1524#ifndef DocFilesToClean
1525#define DocFilesToClean grohtml*.png *-auto-*.png
1526#endif
1527#endif
1528#ifndef MsMacros
1529#define MsMacros -ms
1530#endif
1531#ifndef ManMacros
1532#define ManMacros -man
1533#endif
1534#ifndef TblCmd
1535#define TblCmd tbl
1536#endif
1537#ifndef EqnCmd
1538#define EqnCmd eqn
1539#endif
1540#ifndef NeqnCmd
1541#define NeqnCmd neqn
1542#endif
1543#ifndef ColCmd
1544#define ColCmd col
1545#endif
1546#ifndef ColFlags
1547#define ColFlags -b
1548#endif
1549#ifndef DvipsCmd
1550#define DvipsCmd dvips
1551#endif
1552#ifndef LatexCmd
1553#define LatexCmd latex
1554#endif
1555#ifndef HasPdfLatex
1556#define HasPdfLatex NO
1557#endif
1558#ifndef PdfLatexCmd
1559#define PdfLatexCmd pdflatex
1560#endif
1561#ifndef GhostScriptCmd
1562#define GhostScriptCmd gs
1563#endif
1564#ifndef HasGhostPCL
1565#define HasGhostPCL NO
1566#endif
1567#ifndef HasGhostScript
1568#define HasGhostScript NO
1569#endif
1570#ifndef BuildPDFdocs
1571#define BuildPDFdocs (HasGhostScript)
1572#endif
1573#if BuildPDFdocs
1574#define PsToPdfCmd GhostScriptCmd -q -sOutputFile=- -sDEVICE=pdfwrite -dSAFER -dNOPAUSE -
1575#endif
1576#if HasSentinel
1577#ifndef SentinelCmd
1578#define SentinelCmd sentinel
1579#endif
1580#ifndef SentinelOptions
1581#define SentinelOptions /**/
1582#endif
1583#endif
1584#if HasPurify
1585#ifndef PurifyCmd
1586#define PurifyCmd purify
1587#endif
1588#ifndef PurifyOptions
1589#define PurifyOptions /**/
1590#endif
1591#endif
1592#if HasTestCenter
1593#ifndef ProofCmd
1594#define ProofCmd proof
1595#endif
1596#ifndef ProofOptions
1597#define ProofOptions /**/
1598#endif
1599#endif
1600#ifndef PathSeparator
1601#define PathSeparator /
1602#endif
1603#ifndef Osuf
1604#define Osuf o
1605#endif
1606#ifndef CCsuf
1607#define CCsuf cc
1608#endif
1609#ifndef SHsuf
1610#define SHsuf sh
1611#endif
1612#ifndef ManSuffix
1613#define ManSuffix	n		/* use just one tab or cpp will die */
1614#endif
1615#ifndef LibManSuffix
1616#define LibManSuffix	3		/* use just one tab or cpp will die */
1617#endif
1618#ifndef FileManSuffix
1619#if SystemV || SystemV4 || defined(OSF1Architecture)
1620#define FileManSuffix	4		/* use just one tab or cpp will die */
1621#else
1622#define FileManSuffix	5		/* use just one tab or cpp will die */
1623#endif
1624#endif
1625#ifndef MiscManSuffix
1626#if SystemV || SystemV4 || defined(OSF1Architecture)
1627#define MiscManSuffix	5		/* use just one tab or cpp will die */
1628#else
1629#define MiscManSuffix	7		/* use just one tab or cpp will die */
1630#endif
1631#endif
1632#ifndef DriverManSuffix
1633#if SystemV || SystemV4 || defined(OSF1Architecture)
1634#define DriverManSuffix	7		/* use just one tab or cpp will die */
1635#else
1636#define DriverManSuffix	4		/* use just one tab or cpp will die */
1637#endif
1638#endif
1639#ifndef AdminManSuffix
1640#if SystemV || SystemV4
1641#define AdminManSuffix	1m		/* use just one tab or cpp will die */
1642#else
1643#define AdminManSuffix	8		/* use just one tab or cpp will die */
1644#endif
1645#endif
1646#ifndef ExpandManNames
1647#if SystemV
1648#define ExpandManNames NO
1649#else
1650#define ExpandManNames YES
1651#endif
1652#endif
1653#ifndef ManSrcSuffix
1654#define ManSrcSuffix	man
1655#endif
1656#ifndef ManNewSuffix
1657#define ManNewSuffix	_man
1658#endif
1659#ifndef TOPDIR
1660#define TOPDIR .
1661#endif
1662#ifndef CURDIR
1663#define CURDIR .
1664#endif
1665#ifndef SiteIConfigFiles
1666#define SiteIConfigFiles /**/
1667#endif
1668#ifndef OtherIConfigFiles
1669#define OtherIConfigFiles /**/
1670#endif
1671#ifndef ExtraFilesToClean
1672#define ExtraFilesToClean /**/
1673#endif
1674#ifndef DocFilesToClean
1675#define DocFilesToClean /**/
1676#endif
1677#ifndef FilesToClean
1678#define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
1679#endif
1680
1681#ifdef CrossCompileDir
1682# ifndef StripPath
1683#  define StripPath(x) `echo x|sed "s%.*/%%"`
1684# endif
1685# ifndef CrossArCmd
1686#  define CrossArCmd Concat3(CrossCompileDir,/,StripPath(ArCmd))
1687# endif
1688# ifndef CrossCcCmd
1689#  define CrossCcCmd Concat3(CrossCompileDir,/,StripPath(CcCmd))
1690# endif
1691# ifndef CrossAsCmd
1692#  define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
1693# endif
1694# ifdef HasFortran
1695#  ifndef CrossFortranCmd
1696#   define CrossFortranCmd Concat3(CrossCompileDir,/,StripPath(FortranCmd))
1697#  endif
1698# endif
1699# ifndef CrossCplusplusCmd
1700#  define CrossCplusplusCmd Concat3(CrossCompileDir,/,StripPath(CplusplusCmd))
1701# endif
1702# ifndef CrossCppCmd
1703#  define CrossCppCmd Concat3(CrossCompileDir,/,StripPath(CppCmd))
1704# endif
1705# ifndef CrossRawCppCmdCmd
1706#  define CrossRawCppCmd Concat3(CrossCompileDir,/,StripPath(RawCppCmd))
1707# endif
1708# ifndef CrossPreProcessCmd
1709#  define CrossPreProcessCmd Concat3(CrossCompileDir,/,StripPath(PreProcessCmd))
1710# endif
1711# ifndef CrossAsCmd
1712#  define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
1713# endif
1714# ifndef CrossLdCmd
1715#  define CrossLdCmd Concat3(CrossCompileDir,/,StripPath(LdCmd))
1716# endif
1717# ifndef CrossModuleLdCmd
1718#  define CrossModuleLdCmd CrossLdCmd
1719# endif
1720# ifndef CrossLintCmd
1721#  define CrossLintCmd Concat3(CrossCompileDir,/,StripPath(LintCmd))
1722# endif
1723# ifndef CrossRanlibCmd
1724#  define CrossRanlibCmd Concat3(CrossCompileDir,/,StripPath(RanlibCmd))
1725# endif
1726# ifndef CrossModuleCcCmd
1727#  define CrossModuleCcCmd Concat3(CrossCompileDir,/,StripPath(ModuleCcCmd))
1728# endif
1729# ifndef CrossAsCmd
1730#  define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
1731# endif
1732# ifndef CrossStripCmd
1733#  define CrossStripCmd Concat3(CrossCompileDir,/,StripPath(StripCmd))
1734# endif
1735#endif
1736
1737          PATHSEP = PathSeparator
1738            SHELL = BourneShell
1739
1740              TOP = TOPDIR
1741      CURRENT_DIR = CURDIR
1742
1743            IMAKE = ImakeCmd
1744           DEPEND = DependCmd
1745        MKDIRHIER = MkdirHierCmd
1746          REVPATH = RevPathCmd
1747    EXPORTLISTGEN = ExportListCmd
1748             RMAN = RmanCmd
1749     RMANBASENAME = HostProgramTargetName(rman)
1750      RMANOPTIONS = RmanOptions
1751        CONFIGSRC = ConfigSrc
1752         IMAKESRC = $(CONFIGSRC)/imake
1753        DEPENDSRC = DependDir
1754
1755          INCROOT = IncRoot		/* base of where to put header files */
1756        USRLIBDIR = UsrLibDir		/* nonshared libraries */
1757           VARDIR = VarDirectory	/* usually /var */
1758        VARLIBDIR = VarLibDir		/* xdm runtime files */
1759  SYSTEMUSRLIBDIR = SystemUsrLibDir	/* system's "/usr/lib" */
1760  SYSTEMUSRINCDIR = SystemUsrIncDir	/* system's "/usr/include" */
1761         SHLIBDIR = ShLibDir            /* shared libraries */
1762       LINTLIBDIR = LintlibDir		/* lint libraries */
1763          MANPATH = ManPath		/* top of manual page tree */
1764    MANSOURCEPATH = ManSourcePath	/* prefix for man page sources */
1765           MANDIR = ManDir		/* man pages for commands */
1766        LIBMANDIR = LibmanDir		/* man pages for library routines */
1767       FILEMANDIR = FileManDir		/* man pages for config files */
1768       MISCMANDIR = MiscManDir		/* man pages for miscellaneous files */
1769     DRIVERMANDIR = DriverManDir	/* man pages for drivers */
1770     LOGDIRECTORY = LogDirectory	/* OS location of log files */
1771#ifdef VarRunDirectory
1772        VARRUNDIR = VarRunDirectory	/* OS location of PID files */
1773#endif
1774#ifdef VarDbDirectory
1775         VARDBDIR = VarDbDirectory	/* OS location of db/state files */
1776#endif
1777#ifdef CrossCompileDir
1778               AR = CrossArCmd
1779#else
1780               AR = ArCmd
1781#endif
1782XCOMM Nice try but useless: make will inherit BOOTSTRAPCFLAGS
1783XCOMM from  top Makefile
1784  BOOTSTRAPCFLAGS = BootstrapCFlags	/* set if cpp does not have uniq sym */
1785#ifdef CrossCompileDir
1786               CC = CrossCcCmd
1787               AS = CrossAsCmd
1788#else
1789               CC = CcCmd
1790               AS = AsCmd
1791#endif
1792#if HasFortran
1793# ifdef CrossCompileDir
1794               FC = CrossFortranCmd
1795# else
1796               FC = FortranCmd
1797# endif
1798      FDEBUGFLAGS = FortranDebugFlags
1799          FCFLAGS = FortranFlags $(FDEBUGFLAGS)
1800#endif
1801#if HasCplusplus
1802
1803.SUFFIXES: Concat(.,CCsuf)
1804
1805#ifdef CrossCompileDir
1806              CXX = CrossCplusplusCmd
1807#else
1808              CXX = CplusplusCmd
1809#endif
1810          CXXFILT = CplusplusFilt
1811#ifdef CplusplusLibCDir
1812        CXXLIBDIR = CplusplusLibCDir
1813           CXXLIB = -L$(CXXLIBDIR) CplusplusLibC
1814#else
1815           CXXLIB = CplusplusLibC
1816#endif
1817
1818    CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
1819CXXDEPENDINCLUDES = CplusplusDependIncludes
1820 CXXEXTRA_DEFINES = CplusplusExtraDefines
1821CXXEXTRA_INCLUDES = CplusplusExtraIncludes
1822   CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
1823       CXXOPTIONS = CplusplusOptions
1824      CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
1825       CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES)
1826         CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
1827#endif
1828         COMPRESS = CompressCmd
1829          GZIPCMD = GzipCmd
1830#ifdef CrossCompileDir
1831              CPP = CrossCppCmd $(STD_CPP_DEFINES)
1832           RAWCPP = CrossRawCppCmd $(STD_CPP_OPTIONS)
1833    PREPROCESSCMD = CrossPreProcessCmd $(STD_CPP_DEFINES)
1834#else
1835              CPP = CppCmd $(STD_CPP_DEFINES)		/* simple filters */
1836           RAWCPP = RawCppCmd $(STD_CPP_OPTIONS)
1837    PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES)	/* preferred; mdep */
1838#endif
1839          INSTALL = InstallCmd
1840     INSTALLFLAGS = InstallFlags
1841#ifdef CrossCompileDir
1842               LD = CrossLdCmd
1843#else
1844               LD = LdCmd
1845#endif
1846              LEX = LexCmd
1847               M4 = M4Cmd
1848          M4FLAGS = M4Flags
1849           LEXLIB = LexLib
1850             YACC = YaccCmd
1851           CCYACC = CplusplusYaccCmd
1852#ifdef CrossCompileDir
1853             LINT = CrossLintCmd
1854#else
1855             LINT = LintCmd
1856#endif
1857      LINTLIBFLAG = LintLibFlag
1858         LINTOPTS = LintOpts
1859               LN = LnCmd
1860             MAKE = MakeCmd
1861               MV = MvCmd
1862               CP = CpCmd
1863#if DoRanlibCmd
1864#ifdef CrossCompileDir
1865           RANLIB = CrossCompileDir/RanlibCmd
1866#else
1867           RANLIB = RanlibCmd
1868#endif
1869  RANLIBINSTFLAGS = RanlibInstFlags
1870#endif
1871               RM = RmCmd
1872             PERL = PerlCmd
1873         PERLOPTS = PerlOptions
1874     PERLENVSETUP = PerlEnvSetup
1875        MANSUFFIX = ManSuffix		/* suffix for command man pages */
1876     LIBMANSUFFIX = LibManSuffix	/* suffix for library man pages */
1877    FILEMANSUFFIX = FileManSuffix	/* suffix for file format man pages */
1878    MISCMANSUFFIX = MiscManSuffix	/* suffix for misc man pages */
1879  DRIVERMANSUFFIX = DriverManSuffix	/* suffix for driver man pages */
1880   ADMINMANSUFFIX = AdminManSuffix	/* suffix for admin command man pages */
1881     MANSRCSUFFIX = ManSrcSuffix	/* suffix for man page source */
1882     MANNEWSUFFIX = ManNewSuffix	/* suffix for preprocessed man source */
1883          MANDEFS = AppLoadDefs AppManDefs FileManDefs LibManDefs MiscManDefs DriverManDefs AdminManDefs ProjectManDefs XConfigFileManDefs XConfigDirManDefs XLogFileManDefs XServerManDefs $(XORGMANDEFS) $(VENDORMANDEFS)
1884
1885   COMPRESSMANCMD = CompressManCmd
1886
1887            TROFF = TroffCmd
1888            NROFF = NroffCmd
1889#ifdef HTMLroffCmd
1890         HTMLROFF = HTMLroffCmd
1891#endif
1892#ifdef PsToPdfCmd
1893       PSTOPDFCMD = PsToPdfCmd
1894#endif
1895         MSMACROS = MsMacros
1896        MANMACROS = ManMacros
1897              TBL = TblCmd
1898              EQN = EqnCmd
1899             NEQN = NeqnCmd
1900              COL = ColCmd
1901         COLFLAGS = ColFlags
1902#ifdef CrossCompileDir
1903	    MODCC = CrossModuleCcCmd
1904#else
1905            MODCC = ModuleCcCmd
1906#endif
1907           MODCPP = ModuleCppCmd
1908        MODCFLAGS = ModuleCFlags
1909            MODAS = ModuleAsCmd
1910       MODASFLAGS = ModuleAsFlags
1911#ifdef CrossCompileDir
1912	    MODLD = CrossModuleLdCmd
1913#else
1914            MODLD = ModuleLdCmd
1915#endif
1916       MODLDFLAGS = ModuleLdFlags
1917MODLDCOMBINEFLAGS = ModuleLdCombineFlags
1918            MODAR = ModuleArCmd
1919#ifdef CrossCompileDir
1920        MODRANLIB = CrossCompileDir/ModuleRanlibCmd
1921#else
1922        MODRANLIB = ModuleRanlibCmd
1923#endif
1924#if HasLatex
1925            DVIPS = DvipsCmd
1926            LATEX = LatexCmd
1927#endif
1928#if HasPdfLatex
1929      PDFLATEXCMD = PdfLatexCmd
1930#endif
1931#if HasSentinel
1932         SENTINEL = SentinelCmd
1933  SENTINELOPTIONS = SentinelOptions
1934#endif
1935#if HasPurify
1936           PURIFY = PurifyCmd
1937    PURIFYOPTIONS = PurifyOptions
1938#endif
1939#if HasTestCenter
1940           PROOF = ProofCmd
1941    PROOFOPTIONS = ProofOptions
1942#endif
1943#if CrossCompiling
1944          HOST_CC = HostCcCmd
1945#endif
1946     STD_INCLUDES = StandardIncludes
1947  STD_CPP_OPTIONS = StandardCppOptions
1948  STD_CPP_DEFINES = StandardCppOptions StandardCppDefines $(PROJECT_DEFINES)
1949      STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1950 EXTRA_LOAD_FLAGS = ExtraLoadFlags
1951  EXTRA_LDOPTIONS = ExtraLoadOptions
1952  EXTRA_LIBRARIES = MallocLibraries ExtraLibraries Krb5Libraries
1953             TAGS = TagsCmd
1954#if ConstructMFLAGS
1955           MFLAGS = -$(MAKEFLAGS)
1956#endif
1957#if ConstructMAKEFLAGS
1958        MAKEFLAGS = $(MFLAGS)
1959#endif
1960   PARALLELMFLAGS = ParallelMakeFlags
1961#if HasSharedLibraries
1962    SHAREDCODEDEF = SharedCodeDef
1963         SHLIBDEF = SharedLibraryDef
1964#ifdef SharedLibraryLoadFlags
1965     SHLIBLDFLAGS = SharedLibraryLoadFlags $(SHLIBGLOBALSFLAGS)
1966#if HasGcc
1967         NOSTDLIB = -nostdlib
1968     POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic
1969#elif HasIntelC
1970         NOSTDLIB = -nostdlib
1971     POSTNOSTDLIB =
1972#elif HasSunC
1973         NOSTDLIB = -xnolib
1974     POSTNOSTDLIB =
1975#endif
1976#endif
1977/*
1978 * Here we set up flags needed to produce position-independent code
1979 * when doing C and C++ compilation.  The default if you specify C
1980 * PIC flags without also specifying C++ PIC flags is to assume that
1981 * the C flags work for both.  If your C++ compiler requires different
1982 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1983 */
1984#ifdef PositionIndependentCFlags
1985         PICFLAGS = PositionIndependentCFlags
1986#endif
1987#ifdef PositionIndependentCplusplusFlags
1988      CXXPICFLAGS = PositionIndependentCplusplusFlags
1989#else
1990#ifdef PositionIndependentCFlags
1991      CXXPICFLAGS = PositionIndependentCFlags
1992#endif
1993#endif
1994#endif
1995#if !HasVoidSignalReturn
1996   SIGNAL_DEFINES = -DSIGNALRETURNSINT
1997#endif
1998/*
1999 * The following supports forcing of function prototypes
2000 */
2001#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
2002#define _funcprotodef -DFUNCPROTO=15
2003#else
2004#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
2005#define _funcprotodef -DFUNCPROTO=11
2006#else
2007#if NeedFunctionPrototypes && NeedNestedPrototypes
2008#define _funcprotodef -DFUNCPROTO=9
2009#else
2010#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
2011#define _funcprotodef -DFUNCPROTO=7
2012#else
2013#if NeedFunctionPrototypes && NeedConstPrototypes
2014#define _funcprotodef -DFUNCPROTO=5
2015#else
2016#if NeedFunctionPrototypes && NeedVarargsPrototypes
2017#define _funcprotodef -DFUNCPROTO=3
2018#else
2019#if NeedFunctionPrototypes
2020#define _funcprotodef -DFUNCPROTO
2021#else
2022#define _funcprotodef /**/
2023#endif
2024#endif
2025#endif
2026#endif
2027#endif
2028#endif
2029#endif
2030#if NeedWidePrototypes
2031#define _wideprotodef /**/
2032#else
2033#define _wideprotodef -DNARROWPROTO
2034#endif
2035    PROTO_DEFINES = _funcprotodef _wideprotodef
2036#undef _funcprotodef
2037#undef _wideprotodef
2038
2039#if StripInstalledPrograms
2040     INSTPGMFLAGS = InstPgmFlags	/* install flags for stripping */
2041#else
2042     INSTPGMFLAGS =
2043#endif
2044     INSTBINFLAGS = InstBinFlags	/* install flags for programs */
2045     INSTUIDFLAGS = InstUidFlags	/* install flags for setuid programs */
2046     INSTLIBFLAGS = InstLibFlags	/* install flags for libraries */
2047     INSTINCFLAGS = InstIncFlags	/* install flags for headers */
2048     INSTMANFLAGS = InstManFlags	/* install flags for man pages */
2049     INSTDATFLAGS = InstDatFlags	/* install flags for data files */
2050    INSTKMEMFLAGS = InstKmemFlags	/* install flags for /dev/kmem progs */
2051
2052#ifdef ProjectRoot
2053      PROJECTROOT = ProjectRoot
2054#endif
2055#ifdef UseInstalled
2056# if AlternateIncRoot
2057#  define TopInclude	-I$(INCROOT)
2058# else
2059#  define TopInclude	/**/
2060# endif
2061#else
2062# define TopInclude	-I$(TOP)
2063#endif
2064
2065      CDEBUGFLAGS = DefaultCDebugFlags
2066        CCOPTIONS = DefaultCCOptions	/* to distinguish from param flags */
2067/*
2068 * STD_INCLUDES contains system-specific includes
2069 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
2070 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
2071 * INCLUDES contains client-specific includes set in Imakefile
2072 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
2073 */
2074      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES)
2075       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES)
2076           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES)
2077        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
2078         LDPRELIB = LdPreLib $(INSTALLED_LIBS)
2079        LDPOSTLIB = LdPostLib
2080        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
2081     CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
2082
2083           LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
2084#if HasBrokenCCForLink
2085           CCLINK = LdCmd
2086#else
2087#if AlternateUsrLibDir && HasLdRunPath
2088       CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
2089           CCLINK = $(CCENVSETUP) $(CC)
2090#else
2091           CCLINK = $(CC)
2092#endif
2093#endif
2094#if AlternateUsrLibDir && HasLdRunPath
2095      CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
2096          CXXLINK = $(CXXENVSETUP) $(CXX)
2097#else
2098          CXXLINK = $(CXX)
2099#endif
2100     LDSTRIPFLAGS = LdStripFlags
2101   LDCOMBINEFLAGS = LdCombineFlags
2102      DEPENDFLAGS = DependFlags
2103   DEPEND_DEFINES = DependDefines
2104
2105XCOMM Not sure this belongs here
2106         TKLIBDIR = TkLibDir
2107         TKINCDIR = TkIncDir
2108        TKLIBNAME = TkLibName
2109        TKLIBRARY = TkLibrary
2110        TCLLIBDIR = TclLibDir
2111        TCLINCDIR = TclIncDir
2112       TCLLIBNAME = TclLibName
2113       TCLLIBRARY = TclLibrary
2114
2115        MACROFILE = MacroFile
2116           RM_CMD = $(RM)
2117
2118    IMAKE_DEFINES = /* leave blank, for command line use only */
2119   IMAKE_WARNINGS = ImakeWarningFlags
2120#ifdef UseInstalled
2121         IRULESRC = $(CONFIGDIR)	/* used in rules file */
2122        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) \
2123		    $(IMAKE_WARNINGS)
2124#else
2125         IRULESRC = $(CONFIGSRC)/cf
2126        IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
2127#endif
2128#if !HasClearmake
2129     /* clearmake records relevant defines and flags in the build script,
2130	so it knows when they change and we don't need this coarser-level
2131	dependency.  We also don't want it, since it prevents sharing if
2132	even one config file, say site.def or host.def, changes. */
2133     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
2134			$(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
2135			OtherIConfigFiles SiteIConfigFiles $(EXTRA_ICONFIGFILES)
2136#endif
2137
2138#ifndef TopLevelProject
2139# define TopLevelProject	X11
2140#endif
2141#ifndef ProjectRulesFile
2142# define ProjectRulesFile	Concat3(<,TopLevelProject,.rules>)
2143#endif
2144#include ProjectRulesFile
2145#ifndef LocalRulesFile
2146/* need this to make ANSI-style preprocessors happy */
2147#define LocalRulesFile <noop.rules>
2148#endif
2149#include LocalRulesFile
2150
2151/*
2152 * get project-specific configuration and rules
2153 */
2154#ifndef ProjectTmplFile
2155#define ProjectTmplFile		Concat3(<,TopLevelProject,.tmpl>)
2156#endif
2157#include ProjectTmplFile
2158#ifndef LocalTmplFile
2159/* need this to make ANSI-style preprocessors happy */
2160#define LocalTmplFile <noop.rules>
2161#endif
2162#include LocalTmplFile
2163
2164#if !BuildLibraries && AlternateIncRoot && !defined(CrossCompileDir)
2165INSTALLED_INCLUDES = -I$(INCROOT)
2166#endif
2167
2168#if !defined(UseInstalled) && !BuildLibraries && AlternateUsrLibDir && !defined(CrossCompileDir)
2169INSTALLED_LIBS = -L$(USRLIBDIR)
2170#endif
2171
2172#ifdef FixupLibReferences
2173FixupLibReferences()
2174#endif
2175
2176/* ConfigDir comes from X11.tmpl */
2177        CONFIGDIR = ConfigDir		/* build configuration information */
2178#if HasClearmake
2179           OSNAME = OSName
2180#endif
2181    USRLIBDIRPATH = UsrLibDirPath
2182        LDPRELIBS = LdPreLibs $(INSTALLED_LIBS)
2183       LDPOSTLIBS = LdPostLibs
2184     TOP_INCLUDES = TopIncludes
2185  PROJECT_DEFINES = ProjectDefines
2186   VENDOR_DEFINES = VendorDefines
2187#if HasCplusplus
2188CXXPROJECT_DEFINES = CplusplusProjectDefines
2189#endif
2190
2191XCOMM ----------------------------------------------------------------------
2192XCOMM start of Imakefile
2193#include INCLUDE_IMAKEFILE
2194
2195XCOMM ----------------------------------------------------------------------
2196XCOMM common rules for all Makefiles - do not edit
2197
2198.c.i:
2199	CPPOnlyCompile($*.c,$(_NOOP_))
2200
2201.SUFFIXES: .ii
2202
2203.cc.ii:
2204	CPPOnlyCompile($*.cc,$(_NOOP_))
2205
2206.SUFFIXES: .s
2207
2208.c.s:
2209	CompileCToAsm($(_NOOP_))
2210
2211.cc.s:
2212	CompileCplusplusToAsm($(_NOOP_))
2213
2214/*
2215 * These need to be here so that rules in Imakefile occur first;  the blank
2216 * emptyrule is to make sure that an empty Imakefile does not default to make
2217 * clean.
2218 */
2219emptyrule::
2220
2221CleanTarget()
2222
2223#ifndef IHaveSpecialMakefileTarget
2224MakefileTarget()
2225#endif
2226
2227#if BuildHtmlManPages
2228RmanDependency()
2229#endif
2230
2231TagsTarget()
2232#ifdef MakefileAdditions
2233MakefileAdditions()
2234#endif
2235
2236CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
2237
2238CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
2239
2240ManKeywordsTarget($(MANPATH))
2241
2242HtmlManIndex
2243
2244/* Generate the "real" clean rules */
2245#undef clean
2246
2247clean:: cleandir
2248
2249distclean:: cleandir
2250
2251#ifdef IHaveSubdirs
2252XCOMM ----------------------------------------------------------------------
2253XCOMM rules for building in SUBDIRS - do not edit
2254
2255InstallSubdirs($(SUBDIRS))
2256InstallManSubdirs($(SUBDIRS))
2257InstallDriverSDKSubdirs($(SUBDIRS))
2258CleanSubdirs($(SUBDIRS))
2259TagSubdirs($(SUBDIRS))
2260MakefileSubdirs($(SUBDIRS))
2261IncludesSubdirs($(SUBDIRS))
2262
2263/* "distclean" subdirectories */
2264#undef  BootstrapCleanSubdirs
2265#define BootstrapCleanSubdirs /**/
2266#define clean distclean
2267CleanSubdirs($(SUBDIRS))
2268#undef clean
2269
2270#endif
2271
2272#if !DontPreprocessManPages || defined(PreprocessManPages)
2273    PREPROCESSMANPAGES = true
2274#endif
2275/* must be after all install.man rules that install anything */
2276#ifndef MakeManKeywords
2277#define MakeManKeywords		NO
2278#endif
2279#if MakeManKeywords		/* typically only at top level */
2280install.man:: man_keywords
2281#endif
2282
2283/* must be after all install.man rules that install anything */
2284#ifndef MakeHtmlManIndex
2285#define MakeHtmlManIndex	NO
2286#endif
2287#if MakeHtmlManIndex		/* typically only at top level */
2288install.man:: html_index
2289#endif
2290
2291#ifndef IHaveSubdirs
2292XCOMM ----------------------------------------------------------------------
2293XCOMM empty rules for directories that do not have SUBDIRS - do not edit
2294
2295install::
2296	@echo "install in $(CURRENT_DIR) done"
2297
2298install.man::
2299	@echo "install.man in $(CURRENT_DIR) done"
2300
2301install.sdk::
2302	@echo "install.sdk in $(CURRENT_DIR) done"
2303
2304Makefiles::
2305
2306includes::
2307
2308depend::
2309
2310#endif /* if subdirectory rules are needed */
2311
2312#ifndef IHaveSpecialMakefileTarget
2313/* "distclean" also removes the Makefile and the depend file */
2314distclean::
2315	RemoveFiles(Makefile DependFileName)
2316#endif
2317
2318XCOMM ----------------------------------------------------------------------
2319XCOMM dependencies generated by makedepend
2320IncludeMakefile(DependFileName)
2321