157 warnings: remove -DXK_MISCELLANY from Makefiles
[oweals/cde.git] / cde / config / cf / Imake.tmpl
1 XCOMM ----------------------------------------------------------------------
2 XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
3 XCOMM $TOG: Imake.tmpl /main/249 1997/10/13 15:28:56 kaleb $
4 XCOMM
5
6 /*
7  * generic imake template
8  */
9
10 /*
11  * Modify Imake.cf when adding a new architecture, do not modify this file.
12  * Platform-specific parameters may be set in the appropriate <vendor>.cf
13  * configuration files.  Site-specific parameters should be set in the file
14  * site.def.  Full rebuilds are recommended if any parameters are changed.
15  * If your C preprocessor does not define any unique symbols, you will need
16  * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
17  * "make World" the first time).
18  */
19
20 #define ImakeConfigRelease 6
21
22 #define YES     1
23 #define NO      0
24
25 /* Ensure that "all" is the default target in the Makefile. */
26 all::
27
28 .SUFFIXES: .i
29
30 #include <Imake.cf>
31
32 XCOMM -----------------------------------------------------------------------
33 XCOMM site-specific configuration parameters that need to come before
34 XCOMM the platform-specific parameters - edit site.def to change
35 #define BeforeVendorCF
36 #include <site.def>
37 #undef BeforeVendorCF
38
39 #if defined(HasGcc2) && !defined(HasGcc)
40 # define HasGcc HasGcc2
41 #endif
42
43 #ifndef HasClearmake
44 # define HasClearmake NO
45 #endif
46
47 /*
48  * ClearmakeOSName - insert the current OS type into the clearmake
49  * build script, so .o files from different platforms cannot be winked in.
50  * If clearmake finds the build script for two .o files is the same, it
51  * will share the .o, even across different architectures.  Inserting the
52  * O/S name into the build script in a comment prevents unwanted sharing.
53  * Note the trailing double-@ in the macro: end a line using this macro
54  * with backslash without the double-@ usually used.
55  * Like this:
56  *
57  * #define SomeRule() @@\
58  *     something or other @@\
59  *     ClearmakeOSName \
60  *     something else @@\
61  *     and more
62  */
63 #ifndef ClearmakeOSName
64 # if HasClearmake
65 #  define ClearmakeOSName @ XCOMM $(OSNAME) @@
66 # else
67 #  define ClearmakeOSName /**/
68 # endif
69 #endif
70
71 #if HasClearmake
72 # ifndef MakeCmd
73 #  define MakeCmd clearmake
74 # endif
75 #endif
76
77 #if HasClearmake
78 XCOMM ----------------------------------------------------------------------
79 .c.o:
80         ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
81 #endif
82
83 XCOMM ----------------------------------------------------------------------
84 XCOMM platform-specific configuration parameters - edit MacroFile to change
85 #include MacroIncludeFile
86
87 XCOMM ----------------------------------------------------------------------
88 XCOMM site-specific configuration parameters that go after
89 XCOMM the platform-specific parameters - edit site.def to change
90 #define AfterVendorCF
91 #include <site.def>
92 #undef AfterVendorCF
93
94 /*
95  * defaults for various generic parameters; set in site.def if needed
96  */
97
98 /* the following are needed before we can include Imake.rules */
99
100 #ifndef SystemV
101 #define SystemV                 NO      /* SYSV (R3) */
102 #endif
103 #ifndef SystemV4
104 #define SystemV4                NO      /* SVR4 */
105 #endif
106 #ifndef HasCodeCenter
107 #define HasCodeCenter           NO
108 #endif
109 #ifndef HasSentinel
110 #define HasSentinel             NO
111 #endif
112 #ifndef HasPurify
113 #define HasPurify               NO
114 #endif
115 #ifndef HasTestCenter
116 #define HasTestCenter           NO
117 #endif
118 #ifndef RemoveTargetProgramByMoving
119 #define RemoveTargetProgramByMoving NO
120 #endif
121 #ifndef DoRanlibCmd
122 #if SystemV || SystemV4
123 #define DoRanlibCmd NO
124 #else
125 #define DoRanlibCmd YES
126 #endif
127 #endif
128 #ifndef ExecableScripts
129 #if SystemV
130 #define ExecableScripts         NO
131 #else
132 #define ExecableScripts         YES     /* kernel exec() can handle #! */
133 #endif
134 #endif
135
136 #ifndef HasMakefileSafeInclude      /* -include or sinclude in a Makefile */
137 #if HasClearmake
138 #define HasMakefileSafeInclude  YES
139 #else
140 #define HasMakefileSafeInclude  NO   /* see also vendor-specific .cf files */
141 #endif
142 #endif
143
144 #ifndef HasVarDirectory
145 #define HasVarDirectory         YES
146 #endif
147
148 #include <Imake.rules>
149
150 #ifndef HasSharedLibraries
151 #define HasSharedLibraries NO
152 #endif
153 #ifndef OSMajorVersion
154 #define OSMajorVersion          0
155 #endif
156 #ifndef OSMinorVersion
157 #define OSMinorVersion          0
158 #endif
159 #ifndef UnalignedReferencesAllowed
160 #define UnalignedReferencesAllowed NO   /* if arbitrary deref is okay */
161 #endif
162 #ifndef AvoidNullMakeCommand
163 #define AvoidNullMakeCommand NO
164 #endif
165 #if AvoidNullMakeCommand
166 #ifndef NullMakeCommand
167 #define NullMakeCommand         @ echo -n
168 #endif
169 /*
170  * An obscure bug in BSD4.3's original make causes it not to recognize a
171  * macro definition if the macro name starts with a non-alpha and in
172  * column one.
173  */
174  _NULLCMD_ = NullMakeCommand
175 #endif
176
177 #ifndef CrossCompiling
178 #define CrossCompiling          NO
179 #endif
180 #ifndef BourneShell                     /* to force shell in makefile */
181 #define BourneShell             /bin/sh
182 #endif
183 #ifndef KornShell
184 #define KornShell               /bin/ksh
185 #endif
186 #ifndef ConstructMFLAGS
187 #if SystemV
188 #define ConstructMFLAGS         YES     /* build MFLAGS from MAKEFLAGS */
189 #else
190 #define ConstructMFLAGS         NO      /* build MFLAGS from MAKEFLAGS */
191 #endif
192 #endif
193
194 #ifndef ConstructMAKEFLAGS              /* needed on old BSD-based? */
195 #define ConstructMAKEFLAGS      NO      /* build MAKEFLAGS from MFLAGS */
196 #endif
197
198 #ifndef HasLargeTmp
199 #define HasLargeTmp             NO      /* be paranoid */
200 #endif
201
202 #ifndef HasBSD44Sockets
203 #define HasBSD44Sockets         NO
204 #endif
205 #ifndef HasSockets
206 #define HasSockets              YES
207 #endif
208 #ifndef HasStreams
209 #define HasStreams              !HasSockets
210 #endif
211 #ifndef HasDECnet
212 #define HasDECnet               NO
213 #endif
214 #ifndef HasPoll
215 #if SystemV || SystemV4
216 #define HasPoll                 YES
217 #else
218 #define HasPoll                 NO
219 #endif
220 #endif
221 #ifndef HasVFork
222 #if SystemV
223 #define HasVFork                NO      /* not yet... */
224 #else
225 #define HasVFork                YES
226 #endif
227 #endif
228 #ifndef HasSetUserContext
229 #define HasSetUserContext       NO
230 #endif
231 #ifndef HasLibCrypt
232 #define HasLibCrypt             NO
233 #endif
234 #ifndef HasPutenv
235 #define HasPutenv               NO      /* assume not */
236 #endif
237 #ifndef HasVoidSignalReturn
238 #define HasVoidSignalReturn     YES     /* assume yes */
239 #endif
240 #ifndef HasBsearch
241 #define HasBsearch              YES     /* assume yes */
242 #endif
243 #ifndef HasFortran
244 #define HasFortran              NO
245 #endif
246 #ifndef HasCplusplus
247 #define HasCplusplus            YES
248 #endif
249 #ifndef HasNdbm
250 #define HasNdbm                 NO
251 #endif
252 #ifndef HasSecureRPC
253 #define HasSecureRPC            NO      /* if you have Secure RPC */
254 #endif
255 #ifndef HasKrb5
256 #define HasKrb5                 NO      /* if you have Kerberos V5 */
257 #endif
258 #ifndef HasLatex
259 #define HasLatex                YES
260 #endif
261 #ifndef HasShm
262 #if SystemV || SystemV4
263 #define HasShm                  YES
264 #else
265 #define HasShm                  NO
266 #endif
267 #endif
268 #ifndef HasCbrt
269 #define HasCbrt                 YES
270 #endif
271 #ifndef HasFfs
272 #define HasFfs                  YES
273 #endif
274 #ifndef HasZlib
275 #define HasZlib                 NO
276 #endif
277 #if HasKrb5
278 #ifndef Krb5Includes
279 #define Krb5Includes -I/krb5/include
280 #endif
281 #ifndef Krb5Libraries
282 #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
283 #endif
284 #else
285 #undef Krb5Includes
286 #define Krb5Includes /**/
287 #undef Krb5Libraries
288 #define Krb5Libraries /**/
289 #endif
290 #ifndef NeedConstPrototypes
291 #define NeedConstPrototypes     NO
292 #endif
293 #ifndef NeedVarargsPrototypes
294 #define NeedVarargsPrototypes   NO
295 #endif
296 #ifndef NeedNestedPrototypes
297 #define NeedNestedPrototypes    NO
298 #endif
299 #ifndef NeedFunctionPrototypes
300 #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
301 #endif
302 #ifndef NeedWidePrototypes
303 #define NeedWidePrototypes      YES     /* mix and match ANSI-C, non-ANSI */
304 #endif
305
306 #ifndef StripInstalledPrograms
307 #define StripInstalledPrograms NO       /* leave symbol table just in case */
308 #endif
309 #ifndef UseCCMakeDepend                 /* use slow cc -E script */
310 #define UseCCMakeDepend NO
311 #endif
312
313 /* DefaultUsrBin is independent of ProjectRoot.
314    This is a directory where programs will be found even if PATH
315    is not set, for example when coming in remotely via rsh. */
316 #ifndef DefaultUsrBin
317 #define DefaultUsrBin /usr/bin
318 #endif
319
320 #ifndef UsrLibDir
321 #ifdef ProjectRoot
322 #define UsrLibDir Concat(ProjectRoot,/lib)
323 #ifndef AlternateUsrLibDir
324 #define AlternateUsrLibDir YES
325 #endif
326 #else
327 #define UsrLibDir /usr/lib
328 #ifndef AlternateUsrLibDir
329 #define AlternateUsrLibDir NO
330 #endif
331 #endif
332 #else
333 #ifndef AlternateUsrLibDir
334 #define AlternateUsrLibDir YES
335 #endif
336 #endif
337 #ifndef ShLibDir
338 #define ShLibDir UsrLibDir
339 #endif
340 #ifndef IncRoot
341 #ifdef ProjectRoot
342 #define IncRoot Concat(ProjectRoot,/include)
343 #ifndef AlternateIncRoot
344 #define AlternateIncRoot YES
345 #endif
346 #else
347 #define IncRoot /usr/include
348 #ifndef AlternateIncRoot
349 #define AlternateIncRoot NO
350 #endif
351 #endif
352 #else
353 #ifndef AlternateIncRoot
354 #define AlternateIncRoot YES
355 #endif
356 #endif
357 #ifndef LintlibDir
358 #define LintlibDir $(USRLIBDIR)/lint
359 #endif
360 #ifndef SystemManDirectory
361 #if SystemV4
362 #define SystemManDirectory /usr/share/man
363 #else
364 #define SystemManDirectory /usr/man
365 #endif
366 #endif
367 #ifndef ManDirectoryRoot
368 #ifdef ProjectRoot
369 #define ManDirectoryRoot Concat(ProjectRoot,/man)
370 #else
371 #define ManDirectoryRoot SystemManDirectory
372 #endif
373 #endif
374 #ifndef ManPath
375 #define ManPath ManDirectoryRoot
376 #endif
377 #ifndef ManSourcePath
378 #define ManSourcePath $(MANPATH)/man
379 #endif
380 #ifndef ManDir
381 #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
382 #endif
383 #ifndef LibmanDir
384 #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
385 #endif
386 #ifndef FileManDir
387 #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
388 #endif
389 #ifndef MiscManDir
390 #define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
391 #endif
392 #ifndef ConfigSrc
393 #define ConfigSrc $(TOP)/config
394 #endif
395 #ifndef DependDir
396 #if UseCCMakeDepend
397 #define DependDir $(CONFIGSRC)/util
398 #else
399 #define DependDir $(CONFIGSRC)/makedepend
400 #endif
401 #endif
402 #ifndef UNCOMPRESSPATH
403 #define UNCOMPRESSPATH /usr/ucb/uncompress
404 #endif
405 #ifndef OptimizedCDebugFlags
406 #define OptimizedCDebugFlags -O
407 #endif
408 #ifndef OptimizedCplusplusDebugFlags
409 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
410 #endif
411 #ifndef DebuggableCDebugFlags
412 #define DebuggableCDebugFlags -g
413 #endif
414 #ifndef DebuggableCplusplusDebugFlags
415 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
416 #endif
417 #ifndef ProfiledCDebugFlags
418 #define ProfiledCDebugFlags -pg
419 #endif
420 #ifndef ProfiledCplusplusDebugFlags
421 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
422 #endif
423 #ifndef NoOpCDebugFlags
424 #define NoOpCDebugFlags /**/
425 #endif
426 #ifndef DefaultCDebugFlags
427 #define DefaultCDebugFlags OptimizedCDebugFlags
428 #endif
429 #ifndef DefaultCplusplusDebugFlags
430 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
431 #endif
432 #ifndef DefaultCCOptions
433 #define DefaultCCOptions /* floating point, etc. */
434 #endif
435 #ifndef DefaultCplusplusOptions
436 #define DefaultCplusplusOptions /* floating point, etc. */
437 #endif
438 #ifndef NoRConst
439 #define NoRConst NO /* YES if const for structs of funcs is bad */
440 #endif
441 #ifndef InstPgmFlags
442 #define InstPgmFlags -s
443 #endif
444 #ifndef InstBinFlags
445 #define InstBinFlags -m 0755
446 #endif
447 #ifndef InstUidFlags
448 #define InstUidFlags -m 4711
449 #endif
450 #ifndef InstLibFlags
451 #define InstLibFlags -m 0644
452 #endif
453 #ifndef InstIncFlags
454 #define InstIncFlags -m 0444
455 #endif
456 #ifndef InstManFlags
457 #define InstManFlags -m 0444
458 #endif
459 #ifndef InstDatFlags
460 #define InstDatFlags -m 0444
461 #endif
462 #ifndef InstKmemFlags     /* put -g kmem -m 2711 in site.def... */
463 #define InstKmemFlags InstUidFlags
464 #endif
465 #ifndef ArCmdBase
466 #define ArCmdBase ar
467 #endif
468 #ifndef ArCmd
469 #if HasLargeTmp || SystemV4
470 #define ArCmd ArCmdBase cq
471 #else
472 #define ArCmd ArCmdBase clq
473 #endif
474 #endif
475 #ifndef ArAddCmd
476 #if HasLargeTmp || SystemV4
477 #define ArAddCmd ArCmdBase ru
478 #else
479 #define ArAddCmd ArCmdBase rul
480 #endif
481 #endif
482 #ifndef ArExtCmd
483 #if HasLargeTmp || SystemV4
484 #define ArExtCmd ArCmdBase x
485 #else
486 #define ArExtCmd ArCmdBase xl
487 #endif
488 #endif
489 #ifndef BootstrapCFlags
490 #define BootstrapCFlags /**/
491 #endif
492 #ifndef HasGcc2
493 #define HasGcc2 NO
494 #endif
495 #ifndef HasGcc
496 #define HasGcc HasGcc2
497 #endif
498 #ifndef HasGcc2ForCplusplus
499 #define HasGcc2ForCplusplus NO
500 #endif
501 #ifndef HasCenterLineC
502 #define HasCenterLineC NO
503 #endif
504 #ifndef HasCenterLineCplusplus
505 #define HasCenterLineCplusplus NO
506 #endif
507 #ifndef CcCmd
508 #if HasGcc2
509 #define CcCmd gcc -fpcc-struct-return 
510 #else
511 #if HasGcc
512 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return 
513 #else
514 #if HasCenterLineC
515 #define CcCmd clcc
516 #else
517 #define CcCmd cc
518 #endif
519 #endif
520 #endif
521 #endif
522 #ifndef CplusplusCmd
523 #if HasGcc2ForCplusplus
524 #define CplusplusCmd g++
525 #else
526 #define CplusplusCmd CC
527 #endif
528 #endif
529 #ifndef CplusplusFilt
530 # define CplusplusFilt  c++filt
531 #endif
532 #ifndef CplusplusLibC
533 #define CplusplusLibC /**/
534 #endif
535 #ifndef CplusplusStandardDefines
536 #define CplusplusStandardDefines StandardDefines
537 #endif
538 #ifndef CplusplusExtraDefines
539 #define CplusplusExtraDefines /**/
540 #endif
541 #ifndef CplusplusExtraIncludes
542 #define CplusplusExtraIncludes /**/
543 #endif
544 #ifndef CplusplusDependIncludes
545 #define CplusplusDependIncludes /**/
546 #endif
547 #ifndef CplusplusOptions
548 #define CplusplusOptions /**/
549 #endif
550 #ifndef CplusplusSpecialOptions
551 #define CplusplusSpecialOptions /**/
552 #endif
553 #if HasFortran
554 #ifndef FortranCmd
555 #define FortranCmd f77
556 #endif
557 #ifndef FortranFlags
558 #define FortranFlags /**/
559 #endif
560 #ifndef FortranDebugFlags       /* for -O or -g */
561 #define FortranDebugFlags /**/
562 #endif
563 #endif
564 #ifndef AsCmd
565 #define AsCmd as
566 #endif
567 #ifndef CompressCmd
568 #define CompressCmd compress
569 #endif
570 #ifndef GzipCmd
571 #define GzipCmd gzip
572 #endif
573 #ifndef CppCmd
574 #define CppCmd /lib/cpp
575 #endif
576 #ifndef CppNoLineInfoOption
577 #define CppNoLineInfoOption /**/
578 #endif
579 #ifndef PreProcessCmd
580 #define PreProcessCmd CcCmd -E
581 #endif
582 #ifndef InstallCmd              /* hack should be in project */
583 #if SystemV || SystemV4
584 #ifdef UseInstalled             /* assume BINDIR in path */
585 #define InstallCmd bsdinst
586 #else
587 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
588 #endif
589 #else
590 #define InstallCmd install
591 #endif
592 #endif
593 #ifndef InstallFlags
594 #define InstallFlags -c
595 #endif
596 #ifndef LdCmd
597 #define LdCmd ld
598 #endif
599 #ifndef LexCmd
600 #define LexCmd lex
601 #endif
602 #ifndef LexLib
603 #define LexLib -ll
604 #endif
605 #ifndef YaccCmd
606 #define YaccCmd yacc
607 #endif
608 #ifndef CplusplusYaccCmd
609 #define CplusplusYaccCmd YaccCmd
610 #endif
611 #ifndef LintCmd
612 #define LintCmd lint
613 #endif
614 #ifndef LintLibFlag
615 #if SystemV || SystemV4
616 #define LintLibFlag -o
617 #else
618 #define LintLibFlag -C
619 #endif
620 #endif
621 #ifndef LintOpts
622 #if SystemV || SystemV4
623 #define LintOpts -bh
624 #else
625 #define LintOpts -axz
626 #endif
627 #endif
628 #ifndef CpCmd
629 #define CpCmd cp
630 #endif
631 #ifndef HasSymLinks
632 #define HasSymLinks YES
633 #endif
634 #ifndef LnCmd /* can use cp instead of ln if necessary */
635 #if HasSymLinks
636 #define LnCmd ln -s
637 #else
638 #define LnCmd ln
639 #endif
640 #endif
641 #ifndef MakeCmd
642 #define MakeCmd make
643 #endif
644 #ifndef MvCmd
645 #define MvCmd mv
646 #endif
647 #ifndef RanlibCmd
648 #define RanlibCmd ranlib
649 #endif
650 #ifndef RanlibInstFlags
651 #define RanlibInstFlags /**/
652 #endif
653 #ifndef RmCmd
654 #define RmCmd rm -f
655 #endif
656 #ifndef StandardIncludes        /* for platform-specifics */
657 #define StandardIncludes /**/
658 #endif
659 #ifndef StandardDefines
660 #if SystemV
661 #define StandardDefines -DSYSV
662 #else
663 #if SystemV4
664 #define StandardDefines -DSVR4
665 #else
666 #define StandardDefines /**/
667 #endif
668 #endif
669 #endif
670 #ifndef StandardCppDefines
671 #define StandardCppDefines StandardDefines
672 #endif
673 #ifndef Malloc0ReturnsNull
674 #define Malloc0ReturnsNull NO
675 #endif
676 #if Malloc0ReturnsNull
677 #ifndef Malloc0ReturnsNullDefines
678 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
679 #endif
680 #endif
681 #ifndef ToolkitStringsABIOptions
682 #define ToolkitStringsABIOptions /**/
683 #endif
684 #ifndef NdbmDefines
685 #if HasNdbm
686 #define NdbmDefines -DNDBM
687 #else
688 #define NdbmDefines /**/
689 #endif
690 #endif
691 #ifndef LdPreLib
692 #if !defined(UseInstalled)
693 #define LdPreLib -L$(BUILDLIBDIR)
694 #else
695 #if AlternateUsrLibDir
696 #define LdPreLib -L$(USRLIBDIR)
697 #else
698 #define LdPreLib /**/
699 #endif
700 #endif
701 #endif
702 #ifndef LdPostLib
703 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
704 #define LdPostLib -L$(USRLIBDIR)
705 #else
706 #define LdPostLib /**/
707 #endif
708 #endif
709 #ifndef MathLibrary
710 #define MathLibrary -lm
711 #endif
712 #ifndef DBMLibrary
713 #define DBMLibrary -ldbm
714 #endif
715 #ifndef DlLibrary
716 #define DlLibrary -ldl
717 #endif
718 #ifndef ExtraLibraries
719 #if SystemV4
720 #if HasSockets
721 #define ExtraLibraries -lsocket -lnsl -lw
722 #else
723 #define ExtraLibraries -lnsl -lw
724 #endif
725 #else
726 #define ExtraLibraries /**/
727 #endif
728 #endif
729 #ifndef ExtraLoadOptions
730 #define ExtraLoadOptions /**/
731 #endif
732 #ifndef ExtraLoadFlags
733 #define ExtraLoadFlags /**/
734 #endif
735 #ifndef LdCombineFlags
736 #if SystemV4
737 #define LdCombineFlags -r
738 #else
739 #define LdCombineFlags -X -r
740 #endif
741 #endif
742 #ifndef LdStripFlags
743 #define LdStripFlags -x
744 #endif
745 #ifndef TagsCmd
746 #define TagsCmd ctags
747 #endif
748 #ifndef LoaderLibPrefix
749 #define LoaderLibPrefix /**/
750 #endif
751 #ifndef ImakeCmd
752 #ifdef UseInstalled             /* assume BINDIR in path */
753 #define ImakeCmd imake
754 #else
755 #define ImakeCmd $(IMAKESRC)/imake
756 #endif
757 #endif
758 #ifndef DependCmd
759 #ifdef UseInstalled             /* assume BINDIR in path */
760 #define DependCmd makedepend
761 #else
762 #define DependCmd $(DEPENDSRC)/makedepend
763 #endif
764 #endif
765 #ifndef DependFlags
766 #define DependFlags /**/
767 #endif
768 #ifndef DependFileName
769 #define DependFileName Makefile.dep
770 #endif
771 #ifndef ExportListCmd
772 # ifndef ExportListGenSource
773 #  define ExportListCmd         /**/
774 # elif !defined(UseInstalled)
775 #  define ExportListCmd         $(CONFIGSRC)/util/exportlistgen
776 # else
777 #  define ExportListCmd         exportlistgen
778 # endif
779 #endif
780 #ifndef MkdirHierCmd
781 #ifdef UseInstalled             /* assume BINDIR in path */
782 #define MkdirHierCmd mkdirhier
783 #else
784 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
785 #endif
786 #endif
787 #ifndef TroffCmd
788 #define TroffCmd psroff
789 #endif
790 #ifndef NroffCmd
791 #define NroffCmd nroff
792 #endif
793 #ifndef MsMacros
794 #define MsMacros -ms
795 #endif
796 #ifndef ManMacros
797 #define ManMacros -man
798 #endif
799 #ifndef TblCmd
800 #define TblCmd tbl
801 #endif
802 #ifndef EqnCmd
803 #define EqnCmd eqn
804 #endif
805 #ifndef NeqnCmd
806 #define NeqnCmd neqn
807 #endif
808 #ifndef ColCmd
809 #define ColCmd col
810 #endif
811 #ifndef DvipsCmd
812 #define DvipsCmd dvips
813 #endif
814 #ifndef LatexCmd
815 #define LatexCmd latex
816 #endif
817 #if HasSentinel
818 #ifndef SentinelCmd
819 #define SentinelCmd sentinel
820 #endif
821 #ifndef SentinelOptions
822 #define SentinelOptions /**/
823 #endif
824 #endif
825 #if HasPurify
826 #ifndef PurifyCmd
827 #define PurifyCmd purify
828 #endif
829 #ifndef PurifyOptions
830 #define PurifyOptions /**/
831 #endif
832 #endif
833 #if HasTestCenter
834 #ifndef ProofCmd
835 #define ProofCmd proof
836 #endif
837 #ifndef ProofOptions
838 #define ProofOptions /**/
839 #endif
840 #endif
841 #ifndef PathSeparator
842 #define PathSeparator /
843 #endif
844 #ifndef Osuf
845 #define Osuf o
846 #endif
847 #ifndef CCsuf
848 #define CCsuf cc
849 #endif
850 #ifndef ManSuffix
851 #define ManSuffix       n               /* use just one tab or cpp will die */
852 #endif
853 #ifndef LibManSuffix
854 #define LibManSuffix    3               /* use just one tab or cpp will die */
855 #endif
856 #ifndef FileManSuffix
857 #if SystemV || SystemV4 || defined(OSF1Architecture)
858 #define FileManSuffix   4               /* use just one tab or cpp will die */
859 #else
860 #define FileManSuffix   5               /* use just one tab or cpp will die */
861 #endif
862 #endif
863 #ifndef MiscManSuffix
864 #if SystemV || SystemV4 || defined(OSF1Architecture)
865 #define MiscManSuffix   5               /* use just one tab or cpp will die */
866 #else
867 #define MiscManSuffix   7               /* use just one tab or cpp will die */
868 #endif
869 #endif
870 #ifndef ExpandManNames
871 #if SystemV
872 #define ExpandManNames NO
873 #else
874 #define ExpandManNames YES
875 #endif
876 #endif
877 #ifndef TOPDIR
878 #define TOPDIR .
879 #endif
880 #ifndef CURDIR
881 #define CURDIR .
882 #endif
883 #ifndef SiteIConfigFiles
884 #define SiteIConfigFiles /**/
885 #endif
886 #ifndef ExtraFilesToClean
887 #define ExtraFilesToClean /**/
888 #endif
889 #ifndef FilesToClean
890 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut 
891 #endif
892
893           PATHSEP = PathSeparator
894             SHELL = BourneShell
895         KORNSHELL = KornShell
896
897               TOP = TOPDIR
898       CURRENT_DIR = CURDIR
899
900             IMAKE = ImakeCmd
901            DEPEND = DependCmd
902         MKDIRHIER = MkdirHierCmd
903     EXPORTLISTGEN = ExportListCmd
904         CONFIGSRC = ConfigSrc
905          IMAKESRC = $(CONFIGSRC)/imake
906         DEPENDSRC = DependDir
907
908           INCROOT = IncRoot             /* base of where to put header files */
909         USRLIBDIR = UsrLibDir           /* nonshared libraries */
910          SHLIBDIR = ShLibDir            /* shared libraries */
911        LINTLIBDIR = LintlibDir          /* lint libraries */
912           MANPATH = ManPath             /* top of manual page tree */
913     MANSOURCEPATH = ManSourcePath       /* prefix for man page sources */
914            MANDIR = ManDir              /* man pages for commands */
915         LIBMANDIR = LibmanDir           /* man pages for library routines */
916        FILEMANDIR = FileManDir          /* man pages for config files */
917        MISCMANDIR = MiscManDir          /* man pages for miscellaneous files */
918
919                AR = ArCmd
920   BOOTSTRAPCFLAGS = BootstrapCFlags     /* set if cpp does not have uniq sym */
921                CC = CcCmd
922                AS = AsCmd
923 #if HasFortran
924                FC = FortranCmd
925       FDEBUGFLAGS = FortranDebugFlags
926           FCFLAGS = FortranFlags $(FDEBUGFLAGS)
927 #endif
928 #if HasCplusplus
929
930 .SUFFIXES: .CCsuf
931
932               CXX = CplusplusCmd
933           CXXFILT = CplusplusFilt
934            CXXLIB = CplusplusLibC
935     CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
936 CXXDEPENDINCLUDES = CplusplusDependIncludes
937  CXXEXTRA_DEFINES = CplusplusExtraDefines
938 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
939    CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
940        CXXOPTIONS = CplusplusOptions
941       CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) 
942        CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
943          CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
944 #endif
945          COMPRESS = CompressCmd
946           GZIPCMD = GzipCmd
947               CPP = CppCmd $(STD_CPP_DEFINES)           /* simple filters */
948     PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES)    /* prefered; mdep */
949           INSTALL = InstallCmd
950      INSTALLFLAGS = InstallFlags
951                LD = LdCmd
952               LEX = LexCmd
953            LEXLIB = LexLib
954              YACC = YaccCmd
955            CCYACC = CplusplusYaccCmd
956              LINT = LintCmd
957       LINTLIBFLAG = LintLibFlag
958          LINTOPTS = LintOpts
959                LN = LnCmd
960              MAKE = MakeCmd
961                MV = MvCmd
962                CP = CpCmd
963 #if DoRanlibCmd
964            RANLIB = RanlibCmd
965   RANLIBINSTFLAGS = RanlibInstFlags
966 #endif
967                RM = RmCmd
968         MANSUFFIX = ManSuffix           /* suffix for command man pages */
969      LIBMANSUFFIX = LibManSuffix        /* suffix for library man pages */
970     FILEMANSUFFIX = FileManSuffix       /* suffix for file format man pages */
971     MISCMANSUFFIX = MiscManSuffix       /* suffix for misc man pages */
972
973             TROFF = TroffCmd
974             NROFF = NroffCmd
975          MSMACROS = MsMacros
976         MANMACROS = ManMacros
977               TBL = TblCmd
978               EQN = EqnCmd
979              NEQN = NeqnCmd
980               COL = ColCmd
981 #if HasLatex
982             DVIPS = DvipsCmd
983             LATEX = LatexCmd
984 #endif
985 #if HasSentinel
986          SENTINEL = SentinelCmd
987   SENTINELOPTIONS = SentinelOptions
988 #endif
989 #if HasPurify
990            PURIFY = PurifyCmd
991     PURIFYOPTIONS = PurifyOptions
992 #endif
993 #if HasTestCenter
994            PROOF = ProofCmd
995     PROOFOPTIONS = ProofOptions
996 #endif
997      STD_INCLUDES = StandardIncludes
998   STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
999       STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1000  EXTRA_LOAD_FLAGS = ExtraLoadFlags
1001   EXTRA_LDOPTIONS = ExtraLoadOptions
1002   EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1003              TAGS = TagsCmd
1004 #if ConstructMFLAGS
1005            MFLAGS = -$(MAKEFLAGS)
1006 #endif
1007 #if ConstructMAKEFLAGS
1008         MAKEFLAGS = $(MFLAGS)
1009 #endif
1010 #if HasSharedLibraries
1011     SHAREDCODEDEF = SharedCodeDef
1012          SHLIBDEF = SharedLibraryDef
1013 #ifdef SharedLibraryLoadFlags
1014      SHLIBLDFLAGS = SharedLibraryLoadFlags
1015 #endif
1016 /*
1017  * Here we set up flags needed to produce position-independent code 
1018  * when doing C and C++ compilation.  The default if you specify C
1019  * PIC flags without also specifying C++ PIC flags is to assume that 
1020  * the C flags work for both.  If your C++ compiler requires different
1021  * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1022  */
1023 #ifdef PositionIndependentCFlags
1024          PICFLAGS = PositionIndependentCFlags
1025 #endif
1026 #ifdef PositionIndependentCplusplusFlags
1027       CXXPICFLAGS = PositionIndependentCplusplusFlags
1028 #else
1029 #ifdef PositionIndependentCFlags
1030       CXXPICFLAGS = PositionIndependentCFlags
1031 #endif
1032 #endif
1033 #endif
1034 #if !HasVoidSignalReturn
1035    SIGNAL_DEFINES = -DSIGNALRETURNSINT
1036 #endif
1037 /*
1038  * The following supports forcing of function prototypes
1039  */
1040 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1041 #define _funcprotodef -DFUNCPROTO=15
1042 #else
1043 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1044 #define _funcprotodef -DFUNCPROTO=11
1045 #else
1046 #if NeedFunctionPrototypes && NeedNestedPrototypes
1047 #define _funcprotodef -DFUNCPROTO=9
1048 #else
1049 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1050 #define _funcprotodef -DFUNCPROTO=7
1051 #else
1052 #if NeedFunctionPrototypes && NeedConstPrototypes
1053 #define _funcprotodef -DFUNCPROTO=5
1054 #else
1055 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1056 #define _funcprotodef -DFUNCPROTO=3
1057 #else
1058 #if NeedFunctionPrototypes
1059 #define _funcprotodef -DFUNCPROTO
1060 #else
1061 #define _funcprotodef /**/
1062 #endif
1063 #endif
1064 #endif
1065 #endif
1066 #endif
1067 #endif
1068 #endif
1069 #if NeedWidePrototypes
1070 #define _wideprotodef /**/
1071 #else
1072 #define _wideprotodef -DNARROWPROTO
1073 #endif
1074     PROTO_DEFINES = _funcprotodef _wideprotodef 
1075 #undef _funcprotodef
1076 #undef _wideprotodef
1077
1078 #if StripInstalledPrograms
1079      INSTPGMFLAGS = InstPgmFlags        /* install flags for stripping */
1080 #else
1081      INSTPGMFLAGS = 
1082 #endif
1083      INSTBINFLAGS = InstBinFlags        /* install flags for programs */
1084      INSTUIDFLAGS = InstUidFlags        /* install flags for setuid programs */
1085      INSTLIBFLAGS = InstLibFlags        /* install flags for libraries */
1086      INSTINCFLAGS = InstIncFlags        /* install flags for headers */
1087      INSTMANFLAGS = InstManFlags        /* install flags for man pages */
1088      INSTDATFLAGS = InstDatFlags        /* install flags for data files */
1089     INSTKMEMFLAGS = InstKmemFlags       /* install flags for /dev/kmem progs */
1090
1091 #ifdef ProjectRoot
1092       PROJECTROOT = ProjectRoot
1093 #endif
1094 #ifdef UseInstalled
1095 # if AlternateIncRoot
1096 #  define TopInclude    -I$(INCROOT)
1097 # else
1098 #  define TopInclude    /**/
1099 # endif
1100 #else
1101 # define TopInclude     -I$(TOP)
1102 #endif
1103       CDEBUGFLAGS = DefaultCDebugFlags
1104         CCOPTIONS = DefaultCCOptions    /* to distinguish from param flags */
1105 /*
1106  * STD_INCLUDES contains system-specific includes
1107  * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1108  * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1109  * INCLUDES contains client-specific includes set in Imakefile
1110  * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1111  */
1112       ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1113        ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1114            CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1115         LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1116          LDPRELIB = LdPreLib
1117         LDPOSTLIB = LdPostLib
1118         LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1119      CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1120
1121            LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1122 #if HasBrokenCCForLink
1123            CCLINK = LdCmd
1124 #else
1125 #if AlternateUsrLibDir && HasLdRunPath
1126        CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1127            CCLINK = $(CCENVSETUP) $(CC)
1128 #else
1129            CCLINK = $(CC)
1130 #endif
1131 #endif
1132 #if AlternateUsrLibDir && HasLdRunPath
1133       CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1134           CXXLINK = $(CXXENVSETUP) $(CXX)
1135 #else
1136           CXXLINK = $(CXX)
1137 #endif
1138      LDSTRIPFLAGS = LdStripFlags
1139    LDCOMBINEFLAGS = LdCombineFlags
1140       DEPENDFLAGS = DependFlags
1141
1142         MACROFILE = MacroFile
1143            RM_CMD = $(RM)
1144
1145     IMAKE_DEFINES = /* leave blank, for command line use only */
1146 #ifdef UseInstalled
1147          IRULESRC = $(CONFIGDIR)        /* used in rules file */
1148         IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1149 #else
1150          IRULESRC = $(CONFIGSRC)/cf
1151         IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1152 #endif
1153 #if !HasClearmake
1154      /* clearmake records relevant defines and flags in the build script,
1155         so it knows when they change and we don't need this coarser-level
1156         dependency.  We also don't want it, since it prevents sharing if
1157         even one config file, say site.def or host.def, changes. */
1158      ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1159                         $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1160                         SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1161 #endif
1162
1163 #ifndef TopLevelProject
1164 # define TopLevelProject        X11
1165 #endif
1166 #ifndef ProjectRulesFile
1167 # define ProjectRulesFile       Concat3(<,TopLevelProject,.rules>)
1168 #endif
1169 #include ProjectRulesFile
1170 #ifndef LocalRulesFile
1171 /* need this to make ANSI-style preprocessors happy */
1172 #define LocalRulesFile <noop.rules>
1173 #endif
1174 #include LocalRulesFile
1175
1176 /*
1177  * get project-specific configuration and rules
1178  */
1179 #ifndef ProjectTmplFile
1180 #define ProjectTmplFile         Concat3(<,TopLevelProject,.tmpl>)
1181 #endif
1182 #include ProjectTmplFile
1183 #ifndef LocalTmplFile
1184 /* need this to make ANSI-style preprocessors happy */
1185 #define LocalTmplFile <noop.rules>
1186 #endif
1187 #include LocalTmplFile
1188
1189 #ifdef FixupLibReferences
1190 FixupLibReferences()
1191 #endif
1192
1193 /* ConfigDir comes from X11.tmpl */
1194         CONFIGDIR = ConfigDir           /* build configuration information */
1195 #if HasClearmake
1196            OSNAME = OSName
1197 #endif
1198     USRLIBDIRPATH = UsrLibDirPath
1199         LDPRELIBS = LdPreLibs
1200        LDPOSTLIBS = LdPostLibs
1201      TOP_INCLUDES = TopIncludes
1202   PROJECT_DEFINES = ProjectDefines
1203 #if HasCplusplus
1204 CXXPROJECT_DEFINES = CplusplusProjectDefines
1205 #endif
1206
1207 XCOMM ----------------------------------------------------------------------
1208 XCOMM start of Imakefile
1209 #include INCLUDE_IMAKEFILE
1210
1211 XCOMM ----------------------------------------------------------------------
1212 XCOMM common rules for all Makefiles - do not edit
1213
1214 .c.i:
1215         CPPOnlyCompile($*.c,$(_NOOP_))
1216 /*
1217  * These need to be here so that rules in Imakefile occur first;  the blank
1218  * emptyrule is to make sure that an empty Imakefile does not default to make
1219  * clean.
1220  */
1221 emptyrule::
1222
1223 CleanTarget()
1224
1225 #ifndef IHaveSpecialMakefileTarget
1226 MakefileTarget()
1227 #endif
1228
1229 TagsTarget()
1230 #ifdef MakefileAdditions
1231 MakefileAdditions()
1232 #endif
1233
1234 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1235
1236 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1237
1238 ManKeywordsTarget($(MANPATH))
1239
1240 #ifdef IHaveSubdirs
1241 XCOMM ----------------------------------------------------------------------
1242 XCOMM rules for building in SUBDIRS - do not edit
1243
1244 InstallSubdirs($(SUBDIRS))
1245 InstallManSubdirs($(SUBDIRS))
1246 InstallLinkKitSubdirs($(SUBDIRS))
1247 CleanSubdirs($(SUBDIRS))
1248 TagSubdirs($(SUBDIRS))
1249 MakefileSubdirs($(SUBDIRS))
1250 IncludesSubdirs($(SUBDIRS))
1251
1252 #endif
1253
1254 /* must be after all install.man rules that install anything */
1255 #if MakeManKeywords             /* typically only at top level */
1256 install.man:: man_keywords
1257 #endif
1258
1259 #ifndef IHaveSubdirs
1260 XCOMM ----------------------------------------------------------------------
1261 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1262
1263 install::
1264         @echo "install in $(CURRENT_DIR) done"
1265
1266 install.man::
1267         @echo "install.man in $(CURRENT_DIR) done"
1268
1269 install.linkkit::
1270         @echo "install.linkkit in $(CURRENT_DIR) done"
1271
1272 Makefiles::
1273
1274 includes::
1275
1276 depend::
1277
1278 #endif /* if subdirectory rules are needed */
1279
1280 XCOMM ----------------------------------------------------------------------
1281 XCOMM dependencies generated by makedepend
1282 IncludeMakefile(DependFileName)