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