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