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