dtinfo other requirements
[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 DependDefines
403 #define DependDefines /**/
404 #endif
405 #ifndef UNCOMPRESSPATH
406 #define UNCOMPRESSPATH /usr/ucb/uncompress
407 #endif
408 #ifndef OptimizedCDebugFlags
409 #define OptimizedCDebugFlags -O
410 #endif
411 #ifndef OptimizedCplusplusDebugFlags
412 #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
413 #endif
414 #ifndef DebuggableCDebugFlags
415 #define DebuggableCDebugFlags -g
416 #endif
417 #ifndef DebuggableCplusplusDebugFlags
418 #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
419 #endif
420 #ifndef ProfiledCDebugFlags
421 #define ProfiledCDebugFlags -pg
422 #endif
423 #ifndef ProfiledCplusplusDebugFlags
424 #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
425 #endif
426 #ifndef NoOpCDebugFlags
427 #define NoOpCDebugFlags /**/
428 #endif
429 #ifndef DefaultCDebugFlags
430 #define DefaultCDebugFlags OptimizedCDebugFlags
431 #endif
432 #ifndef DefaultCplusplusDebugFlags
433 #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
434 #endif
435 #ifndef DefaultCCOptions
436 #define DefaultCCOptions /* floating point, etc. */
437 #endif
438 #ifndef DefaultCplusplusOptions
439 #define DefaultCplusplusOptions /* floating point, etc. */
440 #endif
441 #ifndef NoRConst
442 #define NoRConst NO /* YES if const for structs of funcs is bad */
443 #endif
444 #ifndef InstPgmFlags
445 #define InstPgmFlags -s
446 #endif
447 #ifndef InstBinFlags
448 #define InstBinFlags -m 0755
449 #endif
450 #ifndef InstUidFlags
451 #define InstUidFlags -m 4711
452 #endif
453 #ifndef InstLibFlags
454 #define InstLibFlags -m 0644
455 #endif
456 #ifndef InstIncFlags
457 #define InstIncFlags -m 0444
458 #endif
459 #ifndef InstManFlags
460 #define InstManFlags -m 0444
461 #endif
462 #ifndef InstDatFlags
463 #define InstDatFlags -m 0444
464 #endif
465 #ifndef InstKmemFlags     /* put -g kmem -m 2711 in site.def... */
466 #define InstKmemFlags InstUidFlags
467 #endif
468 #ifndef ArCmdBase
469 #define ArCmdBase ar
470 #endif
471 #ifndef ArCmd
472 #if HasLargeTmp || SystemV4
473 #define ArCmd ArCmdBase cq
474 #else
475 #define ArCmd ArCmdBase clq
476 #endif
477 #endif
478 #ifndef ArAddCmd
479 #if HasLargeTmp || SystemV4
480 #define ArAddCmd ArCmdBase ru
481 #else
482 #define ArAddCmd ArCmdBase rul
483 #endif
484 #endif
485 #ifndef ArExtCmd
486 #if HasLargeTmp || SystemV4
487 #define ArExtCmd ArCmdBase x
488 #else
489 #define ArExtCmd ArCmdBase xl
490 #endif
491 #endif
492 #ifndef BootstrapCFlags
493 #define BootstrapCFlags /**/
494 #endif
495 #ifndef HasGcc2
496 #define HasGcc2 NO
497 #endif
498 #ifndef HasGcc
499 #define HasGcc HasGcc2
500 #endif
501 #ifndef HasGcc2ForCplusplus
502 #define HasGcc2ForCplusplus NO
503 #endif
504 #ifndef HasCenterLineC
505 #define HasCenterLineC NO
506 #endif
507 #ifndef HasCenterLineCplusplus
508 #define HasCenterLineCplusplus NO
509 #endif
510 #ifndef CcCmd
511 #if HasGcc2
512 #define CcCmd gcc -fpcc-struct-return 
513 #else
514 #if HasGcc
515 #define CcCmd gcc -fstrength-reduce -fpcc-struct-return 
516 #else
517 #if HasCenterLineC
518 #define CcCmd clcc
519 #else
520 #define CcCmd cc
521 #endif
522 #endif
523 #endif
524 #endif
525 #ifndef CplusplusCmd
526 #if HasGcc2ForCplusplus
527 #define CplusplusCmd g++
528 #else
529 #define CplusplusCmd CC
530 #endif
531 #endif
532 #ifndef CplusplusFilt
533 # define CplusplusFilt  c++filt
534 #endif
535 #ifndef CplusplusLibC
536 #define CplusplusLibC /**/
537 #endif
538 #ifndef CplusplusStandardDefines
539 #define CplusplusStandardDefines StandardDefines
540 #endif
541 #ifndef CplusplusExtraDefines
542 #define CplusplusExtraDefines /**/
543 #endif
544 #ifndef CplusplusExtraIncludes
545 #define CplusplusExtraIncludes /**/
546 #endif
547 #ifndef CplusplusDependIncludes
548 #define CplusplusDependIncludes /**/
549 #endif
550 #ifndef CplusplusOptions
551 #define CplusplusOptions /**/
552 #endif
553 #ifndef CplusplusSpecialOptions
554 #define CplusplusSpecialOptions /**/
555 #endif
556 #if HasFortran
557 #ifndef FortranCmd
558 #define FortranCmd f77
559 #endif
560 #ifndef FortranFlags
561 #define FortranFlags /**/
562 #endif
563 #ifndef FortranDebugFlags       /* for -O or -g */
564 #define FortranDebugFlags /**/
565 #endif
566 #endif
567 #ifndef AsCmd
568 #define AsCmd as
569 #endif
570 #ifndef CompressCmd
571 #define CompressCmd compress
572 #endif
573 #ifndef GzipCmd
574 #define GzipCmd gzip
575 #endif
576 #ifndef CppCmd
577 #define CppCmd /lib/cpp
578 #endif
579 #ifndef CppNoLineInfoOption
580 #define CppNoLineInfoOption /**/
581 #endif
582 #ifndef PreProcessCmd
583 #define PreProcessCmd CcCmd -E
584 #endif
585 #ifndef InstallCmd              /* hack should be in project */
586 #if SystemV || SystemV4
587 #ifdef UseInstalled             /* assume BINDIR in path */
588 #define InstallCmd bsdinst
589 #else
590 #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
591 #endif
592 #else
593 #define InstallCmd install
594 #endif
595 #endif
596 #ifndef InstallFlags
597 #define InstallFlags -c
598 #endif
599 #ifndef LdCmd
600 #define LdCmd ld
601 #endif
602 #ifndef LexCmd
603 #define LexCmd lex
604 #endif
605 #ifndef LexLib
606 #define LexLib -ll
607 #endif
608 #ifndef YaccCmd
609 #define YaccCmd yacc
610 #endif
611 #ifndef CplusplusYaccCmd
612 #define CplusplusYaccCmd YaccCmd
613 #endif
614 #ifndef LintCmd
615 #define LintCmd lint
616 #endif
617 #ifndef LintLibFlag
618 #if SystemV || SystemV4
619 #define LintLibFlag -o
620 #else
621 #define LintLibFlag -C
622 #endif
623 #endif
624 #ifndef LintOpts
625 #if SystemV || SystemV4
626 #define LintOpts -bh
627 #else
628 #define LintOpts -axz
629 #endif
630 #endif
631 #ifndef CpCmd
632 #define CpCmd cp
633 #endif
634 #ifndef HasSymLinks
635 #define HasSymLinks YES
636 #endif
637 #ifndef LnCmd /* can use cp instead of ln if necessary */
638 #if HasSymLinks
639 #define LnCmd ln -s
640 #else
641 #define LnCmd ln
642 #endif
643 #endif
644 #ifndef MakeCmd
645 #define MakeCmd make
646 #endif
647 #ifndef MvCmd
648 #define MvCmd mv
649 #endif
650 #ifndef RanlibCmd
651 #define RanlibCmd ranlib
652 #endif
653 #ifndef RanlibInstFlags
654 #define RanlibInstFlags /**/
655 #endif
656 #ifndef RmCmd
657 #define RmCmd rm -f
658 #endif
659 #ifndef StandardIncludes        /* for platform-specifics */
660 #define StandardIncludes /**/
661 #endif
662 #ifndef StandardDefines
663 #if SystemV
664 #define StandardDefines -DSYSV
665 #else
666 #if SystemV4
667 #define StandardDefines -DSVR4
668 #else
669 #define StandardDefines /**/
670 #endif
671 #endif
672 #endif
673 #ifndef StandardCppDefines
674 #define StandardCppDefines StandardDefines
675 #endif
676 #ifndef Malloc0ReturnsNull
677 #define Malloc0ReturnsNull NO
678 #endif
679 #if Malloc0ReturnsNull
680 #ifndef Malloc0ReturnsNullDefines
681 #define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
682 #endif
683 #endif
684 #ifndef ToolkitStringsABIOptions
685 #define ToolkitStringsABIOptions /**/
686 #endif
687 #ifndef NdbmDefines
688 #if HasNdbm
689 #define NdbmDefines -DNDBM
690 #else
691 #define NdbmDefines /**/
692 #endif
693 #endif
694 #ifndef LdPreLib
695 #if !defined(UseInstalled)
696 #define LdPreLib -L$(BUILDLIBDIR)
697 #else
698 #if AlternateUsrLibDir
699 #define LdPreLib -L$(USRLIBDIR)
700 #else
701 #define LdPreLib /**/
702 #endif
703 #endif
704 #endif
705 #ifndef LdPostLib
706 #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
707 #define LdPostLib -L$(USRLIBDIR)
708 #else
709 #define LdPostLib /**/
710 #endif
711 #endif
712 #ifndef MathLibrary
713 #define MathLibrary -lm
714 #endif
715 #ifndef DBMLibrary
716 #define DBMLibrary -ldbm
717 #endif
718 #ifndef DlLibrary
719 #define DlLibrary -ldl
720 #endif
721 #ifndef ExtraLibraries
722 #if SystemV4
723 #if HasSockets
724 #define ExtraLibraries -lsocket -lnsl -lw
725 #else
726 #define ExtraLibraries -lnsl -lw
727 #endif
728 #else
729 #define ExtraLibraries /**/
730 #endif
731 #endif
732 #ifndef ExtraLoadOptions
733 #define ExtraLoadOptions /**/
734 #endif
735 #ifndef ExtraLoadFlags
736 #define ExtraLoadFlags /**/
737 #endif
738 #ifndef LdCombineFlags
739 #if SystemV4
740 #define LdCombineFlags -r
741 #else
742 #define LdCombineFlags -X -r
743 #endif
744 #endif
745 #ifndef LdStripFlags
746 #define LdStripFlags -x
747 #endif
748 #ifndef TagsCmd
749 #define TagsCmd ctags
750 #endif
751 #ifndef LoaderLibPrefix
752 #define LoaderLibPrefix /**/
753 #endif
754 #ifndef ImakeCmd
755 #ifdef UseInstalled             /* assume BINDIR in path */
756 #define ImakeCmd imake
757 #else
758 #define ImakeCmd $(IMAKESRC)/imake
759 #endif
760 #endif
761 #ifndef DependCmd
762 #ifdef UseInstalled             /* assume BINDIR in path */
763 #define DependCmd makedepend
764 #else
765 #define DependCmd $(DEPENDSRC)/makedepend
766 #endif
767 #endif
768 #ifndef DependFlags
769 #define DependFlags /**/
770 #endif
771 #ifndef DependFileName
772 #define DependFileName Makefile.dep
773 #endif
774 #ifndef ExportListCmd
775 # ifndef ExportListGenSource
776 #  define ExportListCmd         /**/
777 # elif !defined(UseInstalled)
778 #  define ExportListCmd         $(CONFIGSRC)/util/exportlistgen
779 # else
780 #  define ExportListCmd         exportlistgen
781 # endif
782 #endif
783 #ifndef MkdirHierCmd
784 #ifdef UseInstalled             /* assume BINDIR in path */
785 #define MkdirHierCmd mkdirhier
786 #else
787 #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
788 #endif
789 #endif
790 #ifndef TroffCmd
791 #define TroffCmd psroff
792 #endif
793 #ifndef NroffCmd
794 #define NroffCmd nroff
795 #endif
796 #ifndef MsMacros
797 #define MsMacros -ms
798 #endif
799 #ifndef ManMacros
800 #define ManMacros -man
801 #endif
802 #ifndef TblCmd
803 #define TblCmd tbl
804 #endif
805 #ifndef EqnCmd
806 #define EqnCmd eqn
807 #endif
808 #ifndef NeqnCmd
809 #define NeqnCmd neqn
810 #endif
811 #ifndef ColCmd
812 #define ColCmd col
813 #endif
814 #ifndef DvipsCmd
815 #define DvipsCmd dvips
816 #endif
817 #ifndef LatexCmd
818 #define LatexCmd latex
819 #endif
820 #if HasSentinel
821 #ifndef SentinelCmd
822 #define SentinelCmd sentinel
823 #endif
824 #ifndef SentinelOptions
825 #define SentinelOptions /**/
826 #endif
827 #endif
828 #if HasPurify
829 #ifndef PurifyCmd
830 #define PurifyCmd purify
831 #endif
832 #ifndef PurifyOptions
833 #define PurifyOptions /**/
834 #endif
835 #endif
836 #if HasTestCenter
837 #ifndef ProofCmd
838 #define ProofCmd proof
839 #endif
840 #ifndef ProofOptions
841 #define ProofOptions /**/
842 #endif
843 #endif
844 #ifndef PathSeparator
845 #define PathSeparator /
846 #endif
847 #ifndef Osuf
848 #define Osuf o
849 #endif
850 #ifndef CCsuf
851 #define CCsuf cc
852 #endif
853 #ifndef ManSuffix
854 #define ManSuffix       n               /* use just one tab or cpp will die */
855 #endif
856 #ifndef LibManSuffix
857 #define LibManSuffix    3               /* use just one tab or cpp will die */
858 #endif
859 #ifndef FileManSuffix
860 #if SystemV || SystemV4 || defined(OSF1Architecture)
861 #define FileManSuffix   4               /* use just one tab or cpp will die */
862 #else
863 #define FileManSuffix   5               /* use just one tab or cpp will die */
864 #endif
865 #endif
866 #ifndef MiscManSuffix
867 #if SystemV || SystemV4 || defined(OSF1Architecture)
868 #define MiscManSuffix   5               /* use just one tab or cpp will die */
869 #else
870 #define MiscManSuffix   7               /* use just one tab or cpp will die */
871 #endif
872 #endif
873 #ifndef ExpandManNames
874 #if SystemV
875 #define ExpandManNames NO
876 #else
877 #define ExpandManNames YES
878 #endif
879 #endif
880 #ifndef TOPDIR
881 #define TOPDIR .
882 #endif
883 #ifndef CURDIR
884 #define CURDIR .
885 #endif
886 #ifndef SiteIConfigFiles
887 #define SiteIConfigFiles /**/
888 #endif
889 #ifndef ExtraFilesToClean
890 #define ExtraFilesToClean /**/
891 #endif
892 #ifndef FilesToClean
893 #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut 
894 #endif
895
896           PATHSEP = PathSeparator
897             SHELL = BourneShell
898         KORNSHELL = KornShell
899
900               TOP = TOPDIR
901       CURRENT_DIR = CURDIR
902
903             IMAKE = ImakeCmd
904            DEPEND = DependCmd
905         MKDIRHIER = MkdirHierCmd
906     EXPORTLISTGEN = ExportListCmd
907         CONFIGSRC = ConfigSrc
908          IMAKESRC = $(CONFIGSRC)/imake
909         DEPENDSRC = DependDir
910     DEPENDDEFINES = DependDefines
911
912           INCROOT = IncRoot             /* base of where to put header files */
913         USRLIBDIR = UsrLibDir           /* nonshared libraries */
914          SHLIBDIR = ShLibDir            /* shared libraries */
915        LINTLIBDIR = LintlibDir          /* lint libraries */
916           MANPATH = ManPath             /* top of manual page tree */
917     MANSOURCEPATH = ManSourcePath       /* prefix for man page sources */
918            MANDIR = ManDir              /* man pages for commands */
919         LIBMANDIR = LibmanDir           /* man pages for library routines */
920        FILEMANDIR = FileManDir          /* man pages for config files */
921        MISCMANDIR = MiscManDir          /* man pages for miscellaneous files */
922
923                AR = ArCmd
924   BOOTSTRAPCFLAGS = BootstrapCFlags     /* set if cpp does not have uniq sym */
925                CC = CcCmd
926                AS = AsCmd
927 #if HasFortran
928                FC = FortranCmd
929       FDEBUGFLAGS = FortranDebugFlags
930           FCFLAGS = FortranFlags $(FDEBUGFLAGS)
931 #endif
932 #if HasCplusplus
933
934 .SUFFIXES: .CCsuf
935
936               CXX = CplusplusCmd
937           CXXFILT = CplusplusFilt
938            CXXLIB = CplusplusLibC
939     CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
940 CXXDEPENDINCLUDES = CplusplusDependIncludes
941  CXXEXTRA_DEFINES = CplusplusExtraDefines
942 CXXEXTRA_INCLUDES = CplusplusExtraIncludes
943    CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
944        CXXOPTIONS = CplusplusOptions
945       CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) 
946        CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
947          CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
948 #endif
949          COMPRESS = CompressCmd
950           GZIPCMD = GzipCmd
951               CPP = CppCmd $(STD_CPP_DEFINES)           /* simple filters */
952     PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES)    /* prefered; mdep */
953           INSTALL = InstallCmd
954      INSTALLFLAGS = InstallFlags
955                LD = LdCmd
956               LEX = LexCmd
957            LEXLIB = LexLib
958              YACC = YaccCmd
959            CCYACC = CplusplusYaccCmd
960              LINT = LintCmd
961       LINTLIBFLAG = LintLibFlag
962          LINTOPTS = LintOpts
963                LN = LnCmd
964              MAKE = MakeCmd
965                MV = MvCmd
966                CP = CpCmd
967 #if DoRanlibCmd
968            RANLIB = RanlibCmd
969   RANLIBINSTFLAGS = RanlibInstFlags
970 #endif
971                RM = RmCmd
972         MANSUFFIX = ManSuffix           /* suffix for command man pages */
973      LIBMANSUFFIX = LibManSuffix        /* suffix for library man pages */
974     FILEMANSUFFIX = FileManSuffix       /* suffix for file format man pages */
975     MISCMANSUFFIX = MiscManSuffix       /* suffix for misc man pages */
976
977             TROFF = TroffCmd
978             NROFF = NroffCmd
979          MSMACROS = MsMacros
980         MANMACROS = ManMacros
981               TBL = TblCmd
982               EQN = EqnCmd
983              NEQN = NeqnCmd
984               COL = ColCmd
985 #if HasLatex
986             DVIPS = DvipsCmd
987             LATEX = LatexCmd
988 #endif
989 #if HasSentinel
990          SENTINEL = SentinelCmd
991   SENTINELOPTIONS = SentinelOptions
992 #endif
993 #if HasPurify
994            PURIFY = PurifyCmd
995     PURIFYOPTIONS = PurifyOptions
996 #endif
997 #if HasTestCenter
998            PROOF = ProofCmd
999     PROOFOPTIONS = ProofOptions
1000 #endif
1001      STD_INCLUDES = StandardIncludes
1002   STD_CPP_DEFINES = StandardCppDefines $(PROJECT_DEFINES)
1003       STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
1004  EXTRA_LOAD_FLAGS = ExtraLoadFlags
1005   EXTRA_LDOPTIONS = ExtraLoadOptions
1006   EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
1007              TAGS = TagsCmd
1008 #if ConstructMFLAGS
1009            MFLAGS = -$(MAKEFLAGS)
1010 #endif
1011 #if ConstructMAKEFLAGS
1012         MAKEFLAGS = $(MFLAGS)
1013 #endif
1014 #if HasSharedLibraries
1015     SHAREDCODEDEF = SharedCodeDef
1016          SHLIBDEF = SharedLibraryDef
1017 #ifdef SharedLibraryLoadFlags
1018      SHLIBLDFLAGS = SharedLibraryLoadFlags
1019 #endif
1020 /*
1021  * Here we set up flags needed to produce position-independent code 
1022  * when doing C and C++ compilation.  The default if you specify C
1023  * PIC flags without also specifying C++ PIC flags is to assume that 
1024  * the C flags work for both.  If your C++ compiler requires different
1025  * flags, specify them explicitly in PositionIndependentCplusplusFlags.
1026  */
1027 #ifdef PositionIndependentCFlags
1028          PICFLAGS = PositionIndependentCFlags
1029 #endif
1030 #ifdef PositionIndependentCplusplusFlags
1031       CXXPICFLAGS = PositionIndependentCplusplusFlags
1032 #else
1033 #ifdef PositionIndependentCFlags
1034       CXXPICFLAGS = PositionIndependentCFlags
1035 #endif
1036 #endif
1037 #endif
1038 #if !HasVoidSignalReturn
1039    SIGNAL_DEFINES = -DSIGNALRETURNSINT
1040 #endif
1041 /*
1042  * The following supports forcing of function prototypes
1043  */
1044 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
1045 #define _funcprotodef -DFUNCPROTO=15
1046 #else
1047 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
1048 #define _funcprotodef -DFUNCPROTO=11
1049 #else
1050 #if NeedFunctionPrototypes && NeedNestedPrototypes
1051 #define _funcprotodef -DFUNCPROTO=9
1052 #else
1053 #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
1054 #define _funcprotodef -DFUNCPROTO=7
1055 #else
1056 #if NeedFunctionPrototypes && NeedConstPrototypes
1057 #define _funcprotodef -DFUNCPROTO=5
1058 #else
1059 #if NeedFunctionPrototypes && NeedVarargsPrototypes
1060 #define _funcprotodef -DFUNCPROTO=3
1061 #else
1062 #if NeedFunctionPrototypes
1063 #define _funcprotodef -DFUNCPROTO
1064 #else
1065 #define _funcprotodef /**/
1066 #endif
1067 #endif
1068 #endif
1069 #endif
1070 #endif
1071 #endif
1072 #endif
1073 #if NeedWidePrototypes
1074 #define _wideprotodef /**/
1075 #else
1076 #define _wideprotodef -DNARROWPROTO
1077 #endif
1078     PROTO_DEFINES = _funcprotodef _wideprotodef 
1079 #undef _funcprotodef
1080 #undef _wideprotodef
1081
1082 #if StripInstalledPrograms
1083      INSTPGMFLAGS = InstPgmFlags        /* install flags for stripping */
1084 #else
1085      INSTPGMFLAGS = 
1086 #endif
1087      INSTBINFLAGS = InstBinFlags        /* install flags for programs */
1088      INSTUIDFLAGS = InstUidFlags        /* install flags for setuid programs */
1089      INSTLIBFLAGS = InstLibFlags        /* install flags for libraries */
1090      INSTINCFLAGS = InstIncFlags        /* install flags for headers */
1091      INSTMANFLAGS = InstManFlags        /* install flags for man pages */
1092      INSTDATFLAGS = InstDatFlags        /* install flags for data files */
1093     INSTKMEMFLAGS = InstKmemFlags       /* install flags for /dev/kmem progs */
1094
1095 #ifdef ProjectRoot
1096       PROJECTROOT = ProjectRoot
1097 #endif
1098 #ifdef UseInstalled
1099 # if AlternateIncRoot
1100 #  define TopInclude    -I$(INCROOT)
1101 # else
1102 #  define TopInclude    /**/
1103 # endif
1104 #else
1105 # define TopInclude     -I$(TOP)
1106 #endif
1107       CDEBUGFLAGS = DefaultCDebugFlags
1108         CCOPTIONS = DefaultCCOptions    /* to distinguish from param flags */
1109 /*
1110  * STD_INCLUDES contains system-specific includes
1111  * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
1112  * EXTRA_INCLUDES contains project-specific includes set in project incfiles
1113  * INCLUDES contains client-specific includes set in Imakefile
1114  * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
1115  */
1116       ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
1117        ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
1118            CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
1119         LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
1120          LDPRELIB = LdPreLib
1121         LDPOSTLIB = LdPostLib
1122         LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1123      CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
1124
1125            LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
1126 #if HasBrokenCCForLink
1127            CCLINK = LdCmd
1128 #else
1129 #if AlternateUsrLibDir && HasLdRunPath
1130        CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1131            CCLINK = $(CCENVSETUP) $(CC)
1132 #else
1133            CCLINK = $(CC)
1134 #endif
1135 #endif
1136 #if AlternateUsrLibDir && HasLdRunPath
1137       CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
1138           CXXLINK = $(CXXENVSETUP) $(CXX)
1139 #else
1140           CXXLINK = $(CXX)
1141 #endif
1142      LDSTRIPFLAGS = LdStripFlags
1143    LDCOMBINEFLAGS = LdCombineFlags
1144       DEPENDFLAGS = DependFlags
1145
1146         MACROFILE = MacroFile
1147            RM_CMD = $(RM)
1148
1149     IMAKE_DEFINES = /* leave blank, for command line use only */
1150 #ifdef UseInstalled
1151          IRULESRC = $(CONFIGDIR)        /* used in rules file */
1152         IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
1153 #else
1154          IRULESRC = $(CONFIGSRC)/cf
1155         IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
1156 #endif
1157 #if !HasClearmake
1158      /* clearmake records relevant defines and flags in the build script,
1159         so it knows when they change and we don't need this coarser-level
1160         dependency.  We also don't want it, since it prevents sharing if
1161         even one config file, say site.def or host.def, changes. */
1162      ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
1163                         $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
1164                         SiteIConfigFiles $(EXTRA_ICONFIGFILES)
1165 #endif
1166
1167 #ifndef TopLevelProject
1168 # define TopLevelProject        X11
1169 #endif
1170 #ifndef ProjectRulesFile
1171 # define ProjectRulesFile       Concat3(<,TopLevelProject,.rules>)
1172 #endif
1173 #include ProjectRulesFile
1174 #ifndef LocalRulesFile
1175 /* need this to make ANSI-style preprocessors happy */
1176 #define LocalRulesFile <noop.rules>
1177 #endif
1178 #include LocalRulesFile
1179
1180 /*
1181  * get project-specific configuration and rules
1182  */
1183 #ifndef ProjectTmplFile
1184 #define ProjectTmplFile         Concat3(<,TopLevelProject,.tmpl>)
1185 #endif
1186 #include ProjectTmplFile
1187 #ifndef LocalTmplFile
1188 /* need this to make ANSI-style preprocessors happy */
1189 #define LocalTmplFile <noop.rules>
1190 #endif
1191 #include LocalTmplFile
1192
1193 #ifdef FixupLibReferences
1194 FixupLibReferences()
1195 #endif
1196
1197 /* ConfigDir comes from X11.tmpl */
1198         CONFIGDIR = ConfigDir           /* build configuration information */
1199 #if HasClearmake
1200            OSNAME = OSName
1201 #endif
1202     USRLIBDIRPATH = UsrLibDirPath
1203         LDPRELIBS = LdPreLibs
1204        LDPOSTLIBS = LdPostLibs
1205      TOP_INCLUDES = TopIncludes
1206   PROJECT_DEFINES = ProjectDefines
1207 #if HasCplusplus
1208 CXXPROJECT_DEFINES = CplusplusProjectDefines
1209 #endif
1210
1211 XCOMM ----------------------------------------------------------------------
1212 XCOMM start of Imakefile
1213 #include INCLUDE_IMAKEFILE
1214
1215 XCOMM ----------------------------------------------------------------------
1216 XCOMM common rules for all Makefiles - do not edit
1217
1218 .c.i:
1219         CPPOnlyCompile($*.c,$(_NOOP_))
1220 /*
1221  * These need to be here so that rules in Imakefile occur first;  the blank
1222  * emptyrule is to make sure that an empty Imakefile does not default to make
1223  * clean.
1224  */
1225 emptyrule::
1226
1227 CleanTarget()
1228
1229 #ifndef IHaveSpecialMakefileTarget
1230 MakefileTarget()
1231 #endif
1232
1233 TagsTarget()
1234 #ifdef MakefileAdditions
1235 MakefileAdditions()
1236 #endif
1237
1238 CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
1239
1240 CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
1241
1242 ManKeywordsTarget($(MANPATH))
1243
1244 #ifdef IHaveSubdirs
1245 XCOMM ----------------------------------------------------------------------
1246 XCOMM rules for building in SUBDIRS - do not edit
1247
1248 InstallSubdirs($(SUBDIRS))
1249 InstallManSubdirs($(SUBDIRS))
1250 InstallLinkKitSubdirs($(SUBDIRS))
1251 CleanSubdirs($(SUBDIRS))
1252 TagSubdirs($(SUBDIRS))
1253 MakefileSubdirs($(SUBDIRS))
1254 IncludesSubdirs($(SUBDIRS))
1255
1256 #endif
1257
1258 /* must be after all install.man rules that install anything */
1259 #if MakeManKeywords             /* typically only at top level */
1260 install.man:: man_keywords
1261 #endif
1262
1263 #ifndef IHaveSubdirs
1264 XCOMM ----------------------------------------------------------------------
1265 XCOMM empty rules for directories that do not have SUBDIRS - do not edit
1266
1267 install::
1268         @echo "install in $(CURRENT_DIR) done"
1269
1270 install.man::
1271         @echo "install.man in $(CURRENT_DIR) done"
1272
1273 install.linkkit::
1274         @echo "install.linkkit in $(CURRENT_DIR) done"
1275
1276 Makefiles::
1277
1278 includes::
1279
1280 depend::
1281
1282 #endif /* if subdirectory rules are needed */
1283
1284 XCOMM ----------------------------------------------------------------------
1285 XCOMM dependencies generated by makedepend
1286 IncludeMakefile(DependFileName)