Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code
[oweals/cde.git] / cde / config / cf / X11.tmpl
1 XCOMM ----------------------------------------------------------------------
2 XCOMM X Window System Build Parameters and Rules
3 XCOMM $TOG: X11.tmpl /main/308 1998/06/16 15:14:24 msr $
4
5 /***************************************************************************
6  *                                                                         *
7  *                            DEFAULT DEFINITIONS                          *
8  *                                                                         *
9  * The following section contains defaults for things that can             *
10  * overridden in the various *.cf and site.def files.  DO NOT EDIT!        *
11  *                                                                         *
12  **************************************************************************/
13
14 #define ProjectX                604     /* do *not* change this line */
15
16 /* The following project-specific rules are defined at the end of this file:
17  *
18  * InstallAppDefaults           (class)
19  * InstallAppDefaultsLong       (file,class)
20  * MakeFontsDir                 (deplist)
21  * MakeFonts                    ()
22  * InstallFontObjs              (objs,dest)
23  * InstallFonts                 (dest)
24  * InstallFontAliases           (dest)
25  * FontSrc                      (basename)
26  * FontBaseObj                  (basename)
27  * InstallFontScale             (dest)
28  * UncompressedFontTarget       (basename)
29  * CompressedFontTarget         (basename)
30  * FontTarget                   (basename)
31  * FontObj                      (basename)
32  * MakeXkbDir                   (basedir,subdir)
33  */
34
35 /*
36  * X-specific things
37  */
38 #ifndef HasXServer
39 #define HasXServer              YES
40 #endif
41 #ifndef BuildServer
42 #define BuildServer             HasXServer
43 #endif
44 #ifndef BuildFontServer
45 #define BuildFontServer         YES
46 #endif
47 #ifndef BuildFonts
48 #define BuildFonts              (BuildServer | BuildFontServer)
49 #endif
50 #ifndef HasXAudio
51 #define HasXAudio               NO
52 #endif
53 #ifndef BuildXAudio
54 #define BuildXAudio             (HasXAudio & HasCplusplus)
55 #endif
56 #ifndef HasXAServer
57 #define HasXAServer             NO
58 #endif
59 #ifndef BuildXAServer
60 #define BuildXAServer           (HasXAServer & HasCplusplus)
61 #endif
62 #ifndef BuildPhigs
63 #define BuildPhigs              NO
64 #endif
65 #ifndef BuildPexExt
66 #define BuildPexExt             NO
67 #endif
68 #ifndef BuildXInputExt
69 #define BuildXInputExt          NO
70 #endif
71 #ifndef BuildEVI
72 #define BuildEVI                YES
73 #endif
74 #ifndef BuildDBE
75 #define BuildDBE                YES
76 #endif
77 #ifndef BuildDIS
78 #define BuildDIS                NO
79 #endif
80 #ifndef BuildDPMS
81 #define BuildDPMS               YES
82 #endif
83 #ifndef BuildLowMem
84 #define BuildLowMem             NO
85 #endif
86 #ifndef BuildLBX
87 #define BuildLBX                YES
88 #endif
89 #ifndef BuildXIE
90         /*
91          * Turn off building XIE if you are building for low memory
92          * footprint
93          */
94 #if BuildLowMem
95 #define BuildXIE                NO
96 #else
97 #define BuildXIE                YES
98 #endif
99 #endif
100 #ifndef BuildXKB
101 #define BuildXKB                YES
102 #endif
103 #ifndef BuildXKBlib
104 #define BuildXKBlib             YES
105 #endif
106         /*
107          * WARNING: Setting UseXKBInClients to YES cause incompatibilities
108          *          between many clients (such as xterm) and pre-XKB shared
109          *          libraries.
110          */
111 #ifndef UseXKBInClients
112 #define UseXKBInClients         NO      /* use XKB in "normal" clients? */
113 #endif
114 #ifndef BuildMultibuffer
115 #define BuildMultibuffer        NO
116 #endif
117 #ifndef BuildRECORD
118 #define BuildRECORD             YES
119 #endif
120 #ifndef BuildXinerama
121 #define BuildXinerama           NO
122 #endif
123 #ifndef BuildXCSecurity
124 #define BuildXCSecurity         YES
125 #endif
126 #ifndef BuildAppgroup
127 #define BuildAppgroup           YES
128 #endif
129 #ifndef BuildCup
130 #define BuildCup                YES
131 #endif
132         /*
133          * Turn off building PEX if you are building for low memory
134          * footprint
135          */
136 #if BuildLowMem
137 #define BuildPexExt             NO
138 #endif
139 #ifndef HasPlugin
140 #define HasPlugin               NO
141 #endif
142 #ifndef BuildPlugin
143 #define BuildPlugin             HasPlugin
144 #endif
145 #ifndef XprtServer
146 #define XprtServer              BuildServer
147 #endif
148 #ifndef BuildXprint
149 #if XprtServer
150 #define BuildXprint             YES
151 #else
152 #define BuildXprint             NO
153 #endif
154 #endif
155 #ifndef InstallLibManPages
156 #define InstallLibManPages      YES
157 #endif
158 #ifndef InstallXtermSetUID
159 #define InstallXtermSetUID      YES     /* xterm needs to be set uid */
160 #endif
161 #ifndef InstallXinitConfig
162 #define InstallXinitConfig      NO      /* install sample xinit config */
163 #endif
164 #ifndef InstallXdmConfig
165 #define InstallXdmConfig        NO      /* install sample xdm config */
166 #endif
167 #ifndef XdmServersType                  /* what Xservers files to use */
168 #if BuildServer
169 #define XdmServersType ws
170 #else
171 #define XdmServersType fs
172 #endif
173 #endif
174 #ifndef InstallFSConfig
175 #define InstallFSConfig         NO      /* install sample fs config */
176 #endif
177 #ifndef InstallAppDefFiles
178 #define InstallAppDefFiles      YES     /* install application defaults */
179 #endif
180 #ifndef ThreadedX
181 #if HasPosixThreads || HasCThreads
182 #define ThreadedX               YES     /* multi-threaded libraries */
183 #else
184 #define ThreadedX               NO
185 #endif
186 #endif
187 #ifndef ThreadedProject
188 #define ThreadedProject ThreadedX
189 #endif
190 #ifndef HasWChar32
191 #define HasWChar32              SystemV4
192 #endif
193 #ifndef HasXdmAuth
194 #define HasXdmAuth              NO      /* if you can not use XDM-AUTH* */
195 #endif
196 #ifndef PrimaryScreenResolution
197 #define PrimaryScreenResolution 72              /* a common resolution */
198 #endif
199 #ifndef DefaultFontPath
200         /*
201          * Turn off building Speedo and Type1 fonts if you are building for
202          * low memory footprint
203          */
204 #if BuildLowMem
205 #define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
206 #else
207 #if PrimaryScreenResolution < 88                /* (75 + 100) / 2 */
208 #define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
209 #else
210 #define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/
211 #endif
212 #endif
213 #endif
214 #ifndef DefaultFSFontPath
215         /*
216          * Define a default fontpath for Font Server independent of that
217          * for X server if building the X server for low memory footprint
218          */
219 #if BuildLowMem
220 #if PrimaryScreenResolution < 88                /* (75 + 100) / 2 */
221 #define DefaultFSFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,
222 $(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
223 #else
224 #define DefaultFSFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,
225 $(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/
226 #endif
227 #else
228 #define DefaultFSFontPath DefaultFontPath
229 #endif
230 #endif
231 #ifndef DefaultRGBDatabase
232 #define DefaultRGBDatabase $(LIBDIR)/rgb
233 #endif
234 #ifndef UseRgbTxt
235 #define UseRgbTxt               NO      /* default is to compile with dbm */
236 #endif
237 #ifndef FontCompilerFlags
238 #define FontCompilerFlags -t
239 #endif
240 #ifndef ConnectionFlags
241 #if HasStreams
242 #define ConnectionFlags -DSTREAMSCONN
243 #else
244 #if HasDECnet
245 #define ConnectionFlags -DTCPCONN -DUNIXCONN -DDNETCONN
246 #else
247 #define ConnectionFlags -DTCPCONN -DUNIXCONN
248 #endif
249 #endif
250 #endif
251 #ifndef ProjectThreadsDefines
252 #define ProjectThreadsDefines -DXTHREADS
253 #endif
254 #ifndef FontOSDefines
255 #define FontOSDefines /**/
256 #endif
257 #ifndef FontDefines
258 #define FontDefines -DFONT_SNF -DFONT_BDF -DFONT_PCF -DCOMPRESSED_FONTS FontOSDefines
259 #endif
260 #ifndef XawI18nDefines
261 #if SystemV4
262 #define XawI18nDefines -DHAS_WCTYPE_H
263 #else
264 #define XawI18nDefines -DUSE_XWCHAR_STRING
265 #endif
266 #endif
267 #if Malloc0ReturnsNull
268 #ifndef XMalloc0ReturnsNullDefines
269 #define XMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines
270 #endif
271 #ifndef XtMalloc0ReturnsNullDefines
272 #define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines
273 #endif
274 #endif
275 #ifndef ExtensionOSDefines
276 #define ExtensionOSDefines /**/
277 #endif
278 #ifndef ExtensionDefines
279 #ifndef PexDefines
280 #if BuildPexExt
281 #define PexDefines -DPEXEXT
282 #else
283 #define PexDefines /**/
284 #endif
285 #endif
286 #ifndef ShmDefines
287 #if HasShm
288 #define ShmDefines -DMITSHM
289 #else
290 #define ShmDefines /**/
291 #endif
292 #endif
293 #ifndef XInputDefines
294 #if BuildXInputExt
295 #define XInputDefines -DXINPUT
296 #else
297 #define XInputDefines /**/
298 #endif
299 #endif
300 #ifndef XineramaDefines
301 #if BuildXinerama
302 #define XineramaDefines -DPANORAMIX
303 #else
304 #define XineramaDefines /**/
305 #endif
306 #endif
307 #ifndef XieDefines
308 #if BuildXIE
309 #define XieDefines -DXIE
310 #else
311 #define XieDefines /**/
312 #endif
313 #endif
314 #ifndef PrintOnlyServer
315 #define PrintOnlyServer YES
316 #endif
317 #ifndef XprintDefines
318 #if BuildXprint
319 #if PrintOnlyServer
320 #define XprintDefines -DPIXPRIV
321 #else
322 #define XprintDefines -DXPRINT -DPIXPRIV
323 #endif
324 #else
325 #define XprintDefines /**/
326 #endif
327 #endif
328 #ifndef XkbDefines
329 #if BuildXKB
330 #define XkbDefines -DXKB
331 #else
332 #define XkbDefines /**/
333 #endif
334 #endif
335 #ifndef XkbClientDefines
336 #if UseXKBInClients
337 #define XkbClientDefines -DXKB
338 #else
339 #define XkbClientDefines /**/
340 #endif
341 #endif
342 #ifndef XkbServerDefines
343 #define XkbServerDefines /**/
344 #endif
345 #ifndef LbxDefines
346 #if BuildLBX
347 #define LbxDefines -DLBX
348 #else
349 #define LbxDefines /**/
350 #endif
351 #endif
352 #ifndef BigReqDefines
353 #define BigReqDefines -DBIGREQS
354 #endif
355
356 #ifndef EVIDefines
357 #if BuildEVI
358 #define EVIDefines -DEVI
359 #else
360 #define EVIDefines /**/
361 #endif
362 #endif
363
364 #ifndef DBEDefines
365 #if BuildDBE
366 #define DBEDefines -DDBE
367 #else
368 #define DBEDefines /**/
369 #endif
370 #endif
371
372 #ifndef PervasiveDBEDefines
373 #define PervasiveDBEDefines /* -DNEED_DBE_BUF_BITS -DNEED_DBE_BUF_VALIDATE */
374 #endif
375
376 #ifndef MultibufferDefines
377 #if BuildMultibuffer
378 #define MultibufferDefines -DMULTIBUFFER
379 #else
380 #define MultibufferDefines /**/
381 #endif
382 #endif
383
384 #ifndef VidTuneExtensionDefines
385 #define VidTuneExtensionDefines /**/
386 #endif
387
388 #ifndef RECORDDefines
389 #if BuildRECORD
390 #define RECORDDefines -DXRECORD
391 #else
392 #define RECORDDefines /**/
393 #endif
394 #endif
395
396 #ifndef AppgroupDefines
397 #if BuildAppgroup
398 #define AppgroupDefines -DXAPPGROUP
399 #else
400 #define AppgroupDefines /**/
401 #endif
402 #endif
403
404 #ifndef XCSecurityDefines
405 #if BuildXCSecurity
406 #define XCSecurityDefines -DXCSECURITY
407 #else
408 #define XCSecurityDefines /**/
409 #endif
410 #endif
411
412 #ifndef CupDefines
413 #if BuildCup
414 #define CupDefines -DTOGCUP
415 #else
416 #define CupDefines /**/
417 #endif
418 #endif
419
420 #ifndef LowMemDefines
421 #if BuildLowMem
422 #define LowMemDefines -DLOWMEMFTPT
423 #else
424 #define LowMemDefines /**/
425 #endif
426 #endif
427
428 #ifndef DPMSDefines
429 #if BuildDPMS
430 #define DPMSDefines -DDPMSExtension
431 #else
432 #define DPMSDefines /**/
433 #endif
434 #endif
435
436 #ifndef SitePervasiveExtensionDefines
437 #define SitePervasiveExtensionDefines /**/
438 #endif
439 #ifndef PervasiveExtensionDefines
440 #define PervasiveExtensionDefines \
441         -DSHAPE XInputDefines XkbDefines LbxDefines AppgroupDefines \
442         XCSecurityDefines CupDefines PervasiveDBEDefines DPMSDefines \
443         LowMemDefines XprintDefines XineramaDefines SitePervasiveExtensionDefines
444 #endif
445 #ifndef SiteExtensionDefines
446 #define SiteExtensionDefines /**/
447 #endif
448 #ifndef BaseExtensionDefines
449 #define BaseExtensionDefines \
450         MultibufferDefines -DMITMISC -DXTEST -DXSYNC -DXCMISC RECORDDefines \
451         PexDefines ShmDefines XieDefines BigReqDefines VidTuneExtensionDefines \
452         DBEDefines DPMSDefines EVIDefines SiteExtensionDefines
453 #endif
454 #define ExtensionDefines BaseExtensionDefines ExtensionOSDefines
455 #endif /* ExtensionDefines */
456
457 #ifndef HasStrcasecmp
458 #define HasStrcasecmp YES
459 #endif
460
461 #ifndef StrcasecmpDefines
462 # if HasStrcasecmp
463 #  define StrcasecmpDefines /**/
464 # else
465 #  define StrcasecmpDefines -DNEED_STRCASECMP
466 # endif
467 #endif
468
469 #ifndef ServerXdmcpDefines
470 #define ServerXdmcpDefines -DXDMCP
471 #endif
472 #ifndef ServerOSDefines
473 #define ServerOSDefines /**/
474 #endif
475 #if HasKrb5
476 #ifndef Krb5Defines
477 #define Krb5Defines -DK5AUTH
478 #endif
479 #else
480 #define Krb5Defines /**/
481 #endif
482 #ifndef ServerExtraDefines
483 #define ServerExtraDefines /* -DPIXPRIV */
484 #endif
485 #ifndef ServerAssertDefines
486 #define ServerAssertDefines -DNDEBUG
487 #endif
488 #ifndef ServerDefines
489 #define ServerDefines StandardDefines PervasiveExtensionDefines ServerExtraDefines ServerAssertDefines
490 #endif
491 #ifndef PexDipexDefines
492 #define PexDipexDefines /**/
493 #endif
494 #ifndef PexDdpexDefines
495 #define PexDdpexDefines /**/
496 #endif
497 #ifndef PexPhigsDefines
498 #ifndef PexShmIPC
499 #define PexShmIPC HasShm
500 #endif
501 #if PexShmIPC
502 #define PexPhigsDefines /**/
503 #else
504 #define PexPhigsDefines -DPEX_API_SOCKET_IPC
505 #endif
506 #endif
507 #ifndef PexClientDefines
508 #define PexClientDefines -DPEX_SI_PHIGS
509 #endif
510 #ifndef PhigsInclude
511 #ifdef UseInstalled
512 #define PhigsInclude -I$(INCDIR)/X11
513 #else
514 #define PhigsInclude -I$(BUILDINCDIR)
515 #endif
516 #endif
517 #ifndef PexCDebugFlags
518 #define PexCDebugFlags DebuggableCDebugFlags
519 #endif
520 #ifndef PexCCOptions
521 #ifdef LibraryCCOptions
522 #define PexCCOptions LibraryCCOptions
523 #else
524 #define PexCCOptions DefaultCCOptions
525 #endif
526 #endif
527 #ifndef DefaultFSConfigFile
528 #define DefaultFSConfigFile $(LIBDIR)/fs/config
529 #endif
530 #ifndef BinDir
531 #ifdef ProjectRoot
532 #define BinDir Concat(ProjectRoot,/bin)
533 #else
534 #define BinDir /usr/bin/X11
535 #endif
536 #endif
537 #ifndef BuildIncRoot
538 #define BuildIncRoot $(TOP)/exports
539 #endif
540 #ifndef BuildIncDir
541 #define BuildIncDir $(BUILDINCROOT)/include
542 #endif
543 #ifndef BuildIncTop
544 #define BuildIncTop ../..       /* relative to BuildIncDir */
545 #endif
546 #ifndef XTop
547 # if ImportX11
548 #  define XTop $(TOP)/imports/x11
549 # else
550 #  define XTop $(TOP)
551 # endif
552 #endif
553 #ifndef XBuildIncRoot
554 # if ImportX11
555 #  define XBuildIncRoot $(XTOP)
556 # else
557 #  define XBuildIncRoot $(XTOP)/exports
558 # endif
559 #endif
560 #ifndef XBuildIncDir
561 # define XBuildIncDir   $(XBUILDINCROOT)/include/X11
562 #endif
563 #ifndef XBuildIncTop
564 # define XBuildIncTop   ../../..
565 #endif
566 #ifndef XBuildBinDir
567 # define XBuildBinDir   $(XBUILDINCROOT)/bin
568 #endif
569 #ifndef BuildBinDir
570 #define BuildBinDir $(TOP)/exports/bin
571 #endif
572 #ifndef BuildBinTop
573 #define BuildBinTop ../..       /* relative to BuildBinDir */
574 #endif
575 #ifndef BuildLibDir
576 #define BuildLibDir $(TOP)/exports/lib
577 #endif
578 #ifndef BuildLibTop
579 #define BuildLibTop ../..       /* relative to BuildLibDir */
580 #endif
581 #ifndef LibDir
582 #define LibDir $(USRLIBDIR)/X11
583 #endif
584 #ifndef ConfigDir
585 #define ConfigDir $(LIBDIR)/config
586 #endif
587 #ifndef FontDir
588 #define FontDir $(LIBDIR)/fonts
589 #endif
590 #ifndef AdmDir
591 #define AdmDir /usr/adm
592 #endif
593 #ifndef XinitDir
594 #define XinitDir $(LIBDIR)/xinit
595 #endif
596 #ifndef XdmDir
597 #define XdmDir $(LIBDIR)/xdm
598 #endif
599 #ifndef XdmConfigurationSubdirectory            /* under xdm sources */
600 #define XdmConfigurationSubdirectory config
601 #endif
602 #ifndef TwmDir
603 #define TwmDir $(LIBDIR)/twm
604 #endif
605 #ifndef XsmDir
606 #define XsmDir $(LIBDIR)/xsm
607 #endif
608 #ifndef NlsDir
609 #define NlsDir $(LIBDIR)/nls
610 #endif
611 #ifndef XLocaleDir
612 #define XLocaleDir $(LIBDIR)/locale
613 #endif
614 #ifndef PexApiDir
615 #define PexApiDir $(LIBDIR)/PEX
616 #endif
617 #ifndef LbxproxyDir
618 #define LbxproxyDir $(LIBDIR)/lbxproxy
619 #endif
620 #ifndef LbxproxyConfigSubdir            /* under lbxproxy sources */
621 #define LbxproxyConfigSubdir config
622 #endif
623 #ifndef ProxyManagerDir
624 #define ProxyManagerDir $(LIBDIR)/proxymngr
625 #endif
626 #ifndef ServerConfigDir
627 #define ServerConfigDir $(LIBDIR)/xserver
628 #endif
629 #ifndef XPrintDir
630 #define XPrintDir ServerConfigDir
631 #endif
632 #ifndef VarDirectory
633 #define VarDirectory /var/X11
634 #endif
635 #ifndef InstallSecurityConfig
636 #define InstallSecurityConfig YES       /* Install sample security policy */
637 #endif
638 #ifndef XFileSearchPathBase
639 /* avoid SCCS keyword */
640 #define XFileSearchPathBase Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S)
641 #endif
642 #ifndef XFileSearchPathDefault
643 #ifdef XAppLoadDir
644 /* avoid SCCS keyword */
645 #define XFileSearchPathDefault XAppLoadDir/Concat(%N%C,%S):XAppLoadDir/%N%S:XFileSearchPathBase
646 #else
647 #define XFileSearchPathDefault XFileSearchPathBase
648 #endif
649 #endif
650 #ifndef XAppLoadDir
651 #define XAppLoadDir $(LIBDIR)/app-defaults
652 #endif
653 #ifndef XtErrorPrefix
654 #define XtErrorPrefix /* as empty string */
655 #endif
656 #ifndef XtExtraDefines
657 #define XtExtraDefines /* as empty string */
658 #endif
659 #ifndef XtWarningPrefix
660 #define XtWarningPrefix /* as empty string */
661 #endif
662 #ifndef OsNameDefines
663 #define OsNameDefines /* as nothing */
664 #endif
665 #ifndef DefaultUserPath                 /* for xdm */
666 #define DefaultUserPath :/bin:/usr/bin:$(BINDIR):/usr/ucb
667 #endif
668 #ifndef DefaultSystemPath               /* for xdm */
669 #define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR):/usr/ucb
670 #endif
671 #ifndef DefaultSystemShell              /* for xdm to set in SHELL */
672 #define DefaultSystemShell BourneShell
673 #endif
674 #ifndef ContribDir
675 #define ContribDir $(XTOP)/../contrib   /* contrib is outside core tree */
676 #endif
677 #ifndef UnsupportedDir
678 #define UnsupportedDir $(XTOP)/unsupported
679 #endif
680 #ifndef AllocateLocalDefines
681 #define AllocateLocalDefines /**/
682 #endif
683
684 #ifndef ForceNormalLib
685 #define ForceNormalLib (HasGcc && !HasGcc2)
686 #endif
687
688 #ifndef ResourceConfigurationManagement 
689 #define ResourceConfigurationManagement YES
690 #endif
691
692 #ifndef XtPopdownConformance 
693 #define XtPopdownConformance YES
694 #endif
695
696 XCOMM -----------------------------------------------------------------------
697 XCOMM X Window System make variables; these need to be coordinated with rules
698
699 /*
700  * This list must be reflected in the DIRS_TO_BUILD list in the top-level
701  * Makefile.
702  */
703              XTOP = XTop
704            BINDIR = BinDir              /* programs */
705      BUILDINCROOT = BuildIncRoot        /* base of build loc */
706       BUILDINCDIR = BuildIncDir         /* built headers */
707       BUILDINCTOP = BuildIncTop         /* top relative to BUILDINCDIR */
708       BUILDLIBDIR = BuildLibDir         /* built libraries */
709       BUILDLIBTOP = BuildLibTop         /* top relative to BUILDLIBDIR */
710       BUILDBINDIR = BuildBinDir         /* built binaries */
711       BUILDBINTOP = BuildBinTop         /* top relative to BUILDBINDIR */
712     XBUILDINCROOT = XBuildIncRoot       /* base of X build loc */
713      XBUILDINCDIR = XBuildIncDir
714      XBUILDINCTOP = XBuildIncTop
715      XBUILDBINDIR = XBuildBinDir
716            INCDIR = $(INCROOT)          /* header files */
717            ADMDIR = AdmDir              /* server log files */
718            LIBDIR = LibDir              /* rgb, XErrorDB, etc. */
719    TOP_X_INCLUDES = TopXInclude
720
721 #ifdef VarDirectory
722            VARDIR = VarDirectory
723 #endif
724           FONTDIR = FontDir             /* font directories */
725          XINITDIR = XinitDir            /* xinit config files */
726            XDMDIR = XdmDir              /* xdm config files */
727            TWMDIR = TwmDir              /* twm config files */
728            XSMDIR = XsmDir              /* xsm config files */
729            NLSDIR = NlsDir              /* nls files */
730        XLOCALEDIR = XLocaleDir          /* locale files */
731         PEXAPIDIR = PexApiDir           /* PEX support files */
732       LBXPROXYDIR = LbxproxyDir         /* lbxproxy files */
733   PROXYMANAGERDIR = ProxyManagerDir     /* proxy manager config files */
734         XPRINTDIR = XPrintDir           /* print config file root */
735       XAPPLOADDIR = XAppLoadDir         /* application default resource dir */
736        FONTCFLAGS = FontCompilerFlags
737
738      INSTAPPFLAGS = $(INSTDATFLAGS)     /* XXX - this should go away - XXX */
739
740 #if UseInstalledX11
741               RGB = $(BINDIR)/rgb
742             FONTC = $(BINDIR)/bdftopcf
743         MKFONTDIR = $(BINDIR)/mkfontdir
744 #else
745               RGB = $(CLIENTENVSETUP) $(XBUILDBINDIR)/rgb
746             FONTC = $(CLIENTENVSETUP) $(XBUILDBINDIR)/bdftopcf
747         MKFONTDIR = $(CLIENTENVSETUP) $(XBUILDBINDIR)/mkfontdir
748 #endif
749
750        DOCUTILSRC = $(XTOP)/doc/util
751        XDOCMACROS = $(DOCUTILSRC)/macros.t
752        XIDXMACROS = $(DOCUTILSRC)/indexmacros.t
753        PROGRAMSRC = $(TOP)/programs
754            LIBSRC = $(XTOP)/lib
755           FONTSRC = $(XTOP)/fonts
756        INCLUDESRC = BuildIncDir
757       XINCLUDESRC = $(INCLUDESRC)/X11
758         SERVERSRC = $(XTOP)/programs/Xserver
759        CONTRIBSRC = ContribDir
760    UNSUPPORTEDSRC = UnsupportedDir
761            DOCSRC = $(XTOP)/doc
762            RGBSRC = $(XTOP)/programs/rgb
763       BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
764      MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
765     FONTSERVERSRC = $(PROGRAMSRC)/xfs
766        FONTINCSRC = $(XTOP)/include/fonts
767         EXTINCSRC = $(XTOP)/include/extensions
768      TRANSCOMMSRC = $(LIBSRC)/xtrans
769    TRANS_INCLUDES = -I$(TRANSCOMMSRC)
770 #ifdef X11ProjectRoot
771      XPROJECTROOT = X11ProjectRoot
772 #endif
773 #ifdef BuildLibPathVar
774 # ifdef SystemBuildLibPath
775   SYSTEMENVLIBDIR = SystemBuildLibPath
776 # endif
777        XENVLIBDIR = X11BuildLibPath
778    CLIENTENVSETUP = BuildLibPathVar=BuildLibPath
779 #else
780    CLIENTENVSETUP = 
781 #endif
782
783 #ifndef ShLibIncludeFile
784 /* need this to make ANSI-style preprocessors happy */
785 #define ShLibIncludeFile <noop.rules>
786 #endif
787
788 #include ShLibIncludeFile
789
790 #ifndef XBuildLibDir
791 # define XBuildLibDir   BuildLibDir
792 #endif
793
794 #ifndef SharedLibX11
795 #define SharedLibX11 HasSharedLibraries
796 #endif
797 #ifndef NormalLibX11
798 #define NormalLibX11 (!SharedLibX11 | ForceNormalLib)
799 #endif
800 #ifndef DebugLibX11
801 #define DebugLibX11             NO      /* debugged X library */
802 #endif
803 #ifndef ProfileLibX11
804 #define ProfileLibX11           NO      /* profiled X library */
805 #endif
806           XLIBSRC = $(LIBSRC)/X11
807 #if SharedLibX11
808 #ifndef SharedX11Rev
809 #define SharedX11Rev 6.1
810 #endif
811 SharedLibReferences(XONLY,X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev)
812 #else
813 ProjectUnsharedLibReferences(XONLY,X11,$(XLIBSRC),XBuildLibDir)
814 #endif
815          XLIBONLY = $(XONLYLIB)
816
817 #ifndef SharedLibXext
818 #define SharedLibXext HasSharedLibraries
819 #endif
820 #ifndef NormalLibXext
821 #define NormalLibXext (!SharedLibXext | ForceNormalLib)
822 #endif
823 #ifndef DebugLibXext
824 #define DebugLibXext            NO      /* debugged Xext library */
825 #endif
826 #ifndef ProfileLibXext
827 #define ProfileLibXext          NO      /* profiled Xext library */
828 #endif
829       XEXTLIBSRC = $(LIBSRC)/Xext
830 #if SharedLibXext
831 #ifndef SharedXextRev
832 #define SharedXextRev 6.4
833 #endif
834 SharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev)
835 #else
836 ProjectUnsharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),XBuildLibDir)
837 #endif
838 LINTEXTENSIONLIB = $(LINTEXTENSION)
839           DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB)
840              XLIB = $(EXTENSIONLIB) $(XONLYLIB)
841          LINTXLIB = $(LINTXONLYLIB)
842
843 #ifndef SharedLibXau
844 #define SharedLibXau NO         /* don't need shared form */
845 #endif
846 #ifndef NormalLibXau
847 #define NormalLibXau (!SharedLibXau | ForceNormalLib)
848 #endif
849 #ifndef DebugLibXau
850 #define DebugLibXau             NO      /* debugged auth library */
851 #endif
852 #ifndef ProfileLibXau
853 #define ProfileLibXau           NO      /* profiled auth library */
854 #endif
855          XAUTHSRC = $(LIBSRC)/Xau
856 #if SharedLibXau
857 #ifndef SharedXauRev
858 #define SharedXauRev 6.0
859 #endif
860 SharedLibReferences(XAUTH,Xau,$(XAUTHSRC),SOXAUTHREV,SharedXauRev)
861 #else
862 ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),XBuildLibDir)
863 #endif
864
865 #ifndef SharedLibXdmcp
866 #define SharedLibXdmcp NO       /* don't need shared form */
867 #endif
868 #ifndef NormalLibXdmcp
869 #define NormalLibXdmcp (!SharedLibXdmcp | ForceNormalLib)
870 #endif
871 #ifndef DebugLibXdmcp
872 #define DebugLibXdmcp           NO      /* debugged XDMCP library */
873 #endif
874 #ifndef ProfileLibXdmcp
875 #define ProfileLibXdmcp         NO      /* profiled XDMCP library */
876 #endif
877       XDMCPLIBSRC = $(LIBSRC)/Xdmcp
878 #if SharedLibXdmcp
879 #ifndef SharedXdmcpRev
880 #define SharedXdmcpRev 6.0
881 #endif
882 SharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev)
883 #else
884 ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),XBuildLibDir)
885 #endif
886
887 #ifndef SharedLibXmu
888 #define SharedLibXmu HasSharedLibraries
889 #endif
890 #ifndef NormalLibXmu
891 #define NormalLibXmu (!SharedLibXmu | ForceNormalLib)
892 #endif
893 #ifndef DebugLibXmu
894 #define DebugLibXmu             NO      /* debugged Xmu library */
895 #endif
896 #ifndef ProfileLibXmu
897 #define ProfileLibXmu           NO      /* profiled Xmu library */
898 #endif
899            XMUSRC = $(LIBSRC)/Xmu
900 #if SharedLibXmu
901 #ifndef SharedXmuRev
902 #define SharedXmuRev 6.0
903 #endif
904 SharedDSLibReferences(XMU,Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev)
905 #else
906 ProjectUnsharedLibReferences(XMU,Xmu,$(XMUSRC),XBuildLibDir)
907 #endif
908
909 #ifndef SharedOldX
910 #define SharedOldX HasSharedLibraries
911 #endif
912 #ifndef NormalOldX
913 #define NormalOldX (!SharedOldX | ForceNormalLib)
914 #endif
915 #ifndef DebugOldX
916 #define DebugOldX               NO      /* debugged old X library */
917 #endif
918 #ifndef ProfileOldX
919 #define ProfileOldX             NO      /* profiled old X library */
920 #endif
921        OLDXLIBSRC = $(LIBSRC)/oldX
922 #if SharedOldX
923 #ifndef SharedOldXRev
924 #define SharedOldXRev 6.0
925 #endif
926 SharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev)
927 #else
928 ProjectUnsharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),XBuildLibDir)
929 #endif
930
931 #ifndef SharedLibXp
932 #define SharedLibXp HasSharedLibraries
933 #endif
934 #ifndef NormalLibXp
935 #define NormalLibXp (!SharedLibXp | ForceNormalLib)
936 #endif
937 #ifndef DebugLibXp
938 #define DebugLibXp              NO      /* debugged Xp library */
939 #endif
940 #ifndef ProfileLibXp
941 #define ProfileLibXp            NO      /* profiled Xp library */
942 #endif
943          XPLIBSRC = $(LIBSRC)/Xp
944 #if SharedLibXp
945 #ifndef SharedXpRev
946 #define SharedXpRev 6.2
947 #endif
948 SharedLibReferences(XP,Xp,$(XPLIBSRC),SOXPREV,SharedXpRev)
949 #else
950 ProjectUnsharedLibReferences(XP,Xp,$(XPLIBSRC),XBuildLibDir)
951 #endif
952
953 #ifndef SharedLibXt
954 #define SharedLibXt HasSharedLibraries
955 #endif
956 #ifndef NormalLibXt
957 #define NormalLibXt (!SharedLibXt | ForceNormalLib)
958 #endif
959 #ifndef DebugLibXt
960 #define DebugLibXt              NO      /* debugged toolkit library */
961 #endif
962 #ifndef ProfileLibXt
963 #define ProfileLibXt            NO      /* profiled toolkit library */
964 #endif
965        TOOLKITSRC = $(LIBSRC)/Xt
966 #if SharedLibXt
967 #ifndef SharedXtRev
968 #define SharedXtRev 6.0
969 #endif
970 SharedDSLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev)
971 #else
972 ProjectUnsharedLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),XBuildLibDir)
973 #endif
974       DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB)
975          XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB)
976      LINTXTOOLLIB = $(LINTXTOOLONLYLIB)
977
978 #ifndef SharedLibXa
979 #define SharedLibXa     (HasSharedLibraries & HasCplusplus)
980 #endif
981 #ifndef NormalLibXa
982 /* #define NormalLibXa  ((!SharedLibXa | ForceNormalLib) & HasCplusplus) */
983 #define NormalLibXa     YES /* needed for current tests, will correct later */
984 #endif
985 #ifndef DebugLibXa
986 #define DebugLibXa      NO      /* debugged audio library */
987 #endif
988 #ifndef ProfileLibXa
989 #define ProfileLibXa    NO      /* profiled audio library */
990 #endif
991        XALIBSRC = $(LIBSRC)/Xa
992 #if SharedLibXa
993 #ifndef SharedXaRev
994 #define SharedXaRev 1.0
995 #endif
996 SharedLibReferences(XA,Xa,$(XALIBSRC),SOXAREV,SharedXaRev)
997 #else
998 UnsharedLibReferences(XA,Xa,$(XALIBSRC))
999 #endif
1000
1001 #ifndef SharedLibXaw
1002 #define SharedLibXaw HasSharedLibraries
1003 #endif
1004 #ifndef NormalLibXaw
1005 #define NormalLibXaw (!SharedLibXaw | ForceNormalLib)
1006 #endif
1007 #ifndef DebugLibXaw
1008 #define DebugLibXaw             NO      /* debugged widget library */
1009 #endif
1010 #ifndef ProfileLibXaw
1011 #define ProfileLibXaw           NO      /* profiled widget library */
1012 #endif
1013        AWIDGETSRC = $(LIBSRC)/Xaw
1014 #if SharedLibXaw
1015 #ifndef SharedXawRev
1016 #define SharedXawRev 6.1
1017 #endif
1018 SharedDSLibReferences(XAW,Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev)
1019 #else
1020 ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGETSRC),XBuildLibDir)
1021 #endif
1022
1023 #ifndef SharedLibXi
1024 #define SharedLibXi HasSharedLibraries
1025 #endif
1026 #ifndef NormalLibXi
1027 #define NormalLibXi (!SharedLibXi | ForceNormalLib)
1028 #endif
1029 #ifndef DebugLibXi
1030 #define DebugLibXi              NO      /* debugged Xi library */
1031 #endif
1032 #ifndef ProfileLibXi
1033 #define ProfileLibXi            NO      /* profiled Xi library */
1034 #endif
1035          XILIBSRC = $(LIBSRC)/Xi
1036 #if SharedLibXi
1037 #ifndef SharedXiRev
1038 #define SharedXiRev 6.0
1039 #endif
1040 SharedLibReferences(XI,Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev)
1041 #else
1042 ProjectUnsharedLibReferences(XI,Xi,$(XILIBSRC),XBuildLibDir)
1043 #endif
1044
1045 #ifndef SharedLibXtst
1046 #define SharedLibXtst HasSharedLibraries
1047 #endif
1048 #ifndef NormalLibXtst
1049 #define NormalLibXtst (!SharedLibXtst | ForceNormalLib)
1050 #endif
1051 #ifndef DebugLibXtst
1052 #define DebugLibXtst            NO      /* debugged Xtst library */
1053 #endif
1054 #ifndef ProfileLibXtst
1055 #define ProfileLibXtst          NO      /* profiled Xtst library */
1056 #endif
1057       XTESTLIBSRC = $(LIBSRC)/Xtst
1058 #if SharedLibXtst
1059 #ifndef SharedXtstRev
1060 #define SharedXtstRev 6.1
1061 #endif
1062 SharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev)
1063 #else
1064 ProjectUnsharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),XBuildLibDir)
1065 #endif
1066
1067 #ifndef SharedLibPex
1068 #define SharedLibPex HasSharedLibraries
1069 #endif
1070 #ifndef NormalLibPex
1071 #define NormalLibPex (!SharedLibPex | ForceNormalLib)
1072 #endif
1073 #ifndef DebugLibPex
1074 #define DebugLibPex             NO      /* debugged PEX5 library */
1075 #endif
1076 #ifndef ProfileLibPex
1077 #define ProfileLibPex           NO      /* profiled PEX5 library */
1078 #endif
1079         PEXLIBSRC = $(LIBSRC)/PEX5
1080 #if SharedLibPex
1081 #ifndef SharedPexRev
1082 #define SharedPexRev 6.0
1083 #endif
1084 SharedLibReferences(PEX,PEX5,$(PEXLIBSRC),SOPEXREV,SharedPexRev)
1085 #else
1086 ProjectUnsharedLibReferences(PEX,PEX5,$(PEXLIBSRC),XBuildLibDir)
1087 #endif
1088
1089 #ifndef SharedLibXie
1090 #define SharedLibXie HasSharedLibraries
1091 #endif
1092 #ifndef NormalLibXie
1093 #define NormalLibXie (!SharedLibXie | ForceNormalLib)
1094 #endif
1095 #ifndef DebugLibXie
1096 #define DebugLibXie             NO      /* debugged XIE library */
1097 #endif
1098 #ifndef ProfileLibXie
1099 #define ProfileLibXie           NO      /* profiled XIE library */
1100 #endif
1101         XIELIBSRC = $(LIBSRC)/XIE
1102 #if SharedLibXie
1103 #ifndef SharedXieRev
1104 #define SharedXieRev 6.0
1105 #endif
1106 SharedLibReferences(XIE,XIE,$(XIELIBSRC),SOXIEREV,SharedXieRev)
1107 #else
1108 ProjectUnsharedLibReferences(XIE,XIE,$(XIELIBSRC),XBuildLibDir)
1109 #endif
1110
1111 #ifndef SharedLibPhigs
1112 #define SharedLibPhigs NO       /* XXX - haven't made it sharable yet */
1113 #endif
1114 #ifndef NormalLibPhigs
1115 #define NormalLibPhigs (!SharedLibPhigs | ForceNormalLib)
1116 #endif
1117       PHIGSLIBSRC = $(LIBSRC)/PHIGS
1118 #if SharedLibPhigs
1119 #ifndef SharedPhigsRev
1120 #define SharedPhigsRev 6.0
1121 #endif
1122 SharedLibReferences(PHIGS,phigs,$(PHIGSLIBSRC),SOPHIGSREV,SharedPhigsRev)
1123 #else
1124 ProjectUnsharedLibReferences(PHIGS,phigs,$(PHIGSLIBSRC),XBuildLibDir)
1125 #endif
1126
1127 ProjectUnsharedLibReferences(XBSD,Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir)
1128
1129 #ifndef SharedLibICE
1130 #define SharedLibICE HasSharedLibraries
1131 #endif
1132 #ifndef NormalLibICE
1133 #define NormalLibICE (!SharedLibICE | ForceNormalLib)
1134 #endif
1135 #ifndef DebugLibICE
1136 #define DebugLibICE             NO      /* debugged ICE library */
1137 #endif
1138 #ifndef ProfileLibICE
1139 #define ProfileLibICE           NO      /* profiled ICE library */
1140 #endif
1141            ICESRC = $(LIBSRC)/ICE
1142 #if SharedLibICE
1143 #ifndef SharedICERev
1144 #define SharedICERev 6.3
1145 #endif
1146 SharedLibReferences(ICE,ICE,$(ICESRC),SOICEREV,SharedICERev)
1147 #else
1148 ProjectUnsharedLibReferences(ICE,ICE,$(ICESRC),XBuildLibDir)
1149 #endif
1150
1151 #ifndef SharedLibSM
1152 #define SharedLibSM HasSharedLibraries
1153 #endif
1154 #ifndef NormalLibSM
1155 #define NormalLibSM (!SharedLibSM | ForceNormalLib)
1156 #endif
1157 #ifndef DebugLibSM
1158 #define DebugLibSM              NO      /* debugged SM library */
1159 #endif
1160 #ifndef ProfileLibSM
1161 #define ProfileLibSM            NO      /* profiled SM library */
1162 #endif
1163             SMSRC = $(LIBSRC)/SM
1164 #if SharedLibSM
1165 #ifndef SharedSMRev
1166 #define SharedSMRev 6.0
1167 #endif
1168 SharedLibReferences(SM,SM,$(SMSRC),SOSMREV,SharedSMRev)
1169 #else
1170 ProjectUnsharedLibReferences(SM,SM,$(SMSRC),XBuildLibDir)
1171 #endif
1172
1173 #ifndef SharedLibXkey
1174 #define SharedLibXkey HasSharedLibraries
1175 #endif
1176 #ifndef NormalLibXkey
1177 #define NormalLibXkey (!SharedLibXkey | ForceNormalLib)
1178 #endif
1179 #ifndef DebugLibXkey
1180 #define DebugLibXkey            NO      /* debugged Xkey library */
1181 #endif
1182 #ifndef ProfileLibXkey
1183 #define ProfileLibXkey          NO      /* profiled Xkey library */
1184 #endif
1185            XKEYSRC = $(LIBSRC)/Xkey
1186 #if SharedLibXkey
1187 #ifndef SharedXkeyRev
1188 #define SharedXkeyRev 6.0
1189 #endif
1190 SharedLibReferences(XKEY,Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev)
1191 #else
1192 ProjectUnsharedLibReferences(XKEY,Xkey,$(XKEYSRC),XBuildLibDir)
1193 #endif
1194
1195 #ifndef SharedLibFS
1196 #define SharedLibFS             NO      /* for now */
1197 #endif
1198 #ifndef NormalLibFS
1199 #define NormalLibFS (!SharedLibFS | ForceNormalLib)
1200 #endif
1201 #ifndef DebugLibFS
1202 #define DebugLibFS              NO      /* debugged FS library */
1203 #endif
1204 #ifndef ProfileLibFS
1205 #define ProfileLibFS            NO      /* profiled FS library */
1206 #endif
1207          FSLIBSRC = $(LIBSRC)/FS
1208 #if SharedLibFS
1209 #ifndef SharedFSRev
1210 #define SharedFSRev 6.0
1211 #endif
1212 SharedLibReferences(FS,FS,$(FSLIBSRC),SOFSREV,SharedFSRev)
1213 #else
1214 ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir)
1215 #endif
1216
1217          FONTLIBSRC = $(LIBSRC)/font
1218 ProjectUnsharedLibReferences(FONT,font,$(FONTLIBSRC),XBuildLibDir)
1219
1220 #ifdef BuildXKBlib
1221     XKBFILELIBSRC = $(LIBSRC)/xkbfile
1222 ProjectUnsharedLibReferences(XKBFILE,xkbfile,$(XKBFILELIBSRC),XBuildLibDir)
1223 #ifndef XkbClientDepLibs
1224 #if UseXKBInClients
1225 #define XkbClientDepLibs $(DEPXKBFILELIB)
1226 #else
1227 #define XkbClientDepLibs /**/
1228 #endif
1229 #endif
1230 #ifndef XkbClientLibs
1231 #if UseXKBInClients
1232 #define XkbClientLibs $(XKBFILELIB)
1233 #else
1234 #define XkbClientLibs /**/
1235 #endif
1236 #endif
1237 #ifdef UseInstalled
1238      XKBCOMPCMD = $(BINDIR)/xkbcomp
1239 #else
1240      XKBCOMPSRC = $(PROGRAMSRC)/xkbcomp
1241      XKBCOMPCMD = $(CLIENTENVSETUP) $(XBUILDBINDIR)/xkbcomp
1242 #endif
1243 #else /* !BuildXKBlib */
1244 #ifndef XkbClientDepLibs
1245 #define XkbClientDepLibs
1246 #endif
1247 #ifndef XkbClientLibs
1248 #define XkbClientLibs
1249 #endif
1250 #endif /* BuildXKBlib */
1251
1252 #ifndef XawClientDepLibs
1253 #define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
1254 #endif
1255 #ifndef XawClientLibs
1256 #define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
1257 #endif
1258
1259 #ifndef NeedDefaultDepLibs
1260 #define NeedDefaultDepLibs YES
1261 #endif
1262
1263 #if NeedDefaultDepLibs
1264 /*
1265  * Individual libraries should override this
1266  */
1267 #if HasSharedLibraries || defined(UseInstalled)
1268           DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
1269 #else
1270           DEPLIBS = $(LOCAL_LIBRARIES)
1271 #endif
1272          DEPLIBS1 = $(DEPLIBS)
1273          DEPLIBS2 = $(DEPLIBS)
1274          DEPLIBS3 = $(DEPLIBS)
1275          DEPLIBS4 = $(DEPLIBS)
1276          DEPLIBS5 = $(DEPLIBS)
1277          DEPLIBS6 = $(DEPLIBS)
1278          DEPLIBS7 = $(DEPLIBS)
1279          DEPLIBS8 = $(DEPLIBS)
1280          DEPLIBS9 = $(DEPLIBS)
1281          DEPLIBS10 = $(DEPLIBS)
1282 #endif /* NeedDefaultDepLibs */
1283
1284
1285 /*
1286  * InstallAppDefaults - simple rules to install application default file
1287  */
1288 #ifndef InstallAppDefaults
1289 #define InstallAppDefaults(class) InstallAppDefaultsLong(class,class)
1290 #endif /* InstallAppDefaults */
1291
1292 /*
1293  * InstallAppDefaultsLong - general rule to install application default file
1294  * if the InstallAppDefFiles configuration parameter is set.
1295  */
1296 #ifndef InstallAppDefaultsLong
1297 #if InstallAppDefFiles
1298 #define InstallAppDefaultsLong(file,class)                              @@\
1299 LinkVarDirectory(app-defaults,.,app-defaults,.)                         @@\
1300 InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
1301 #else
1302 #define InstallAppDefaultsLong(file,class)                              @@\
1303 LinkVarDirectory(app-defaults,.,app-defaults,.)                         @@\
1304 InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
1305 #endif /* InstallAppDefFiles */
1306 #endif /* InstallAppDefaultsLong */
1307
1308 /*
1309  * MakeFontsDir - generate rules to build fonts.dir database.
1310  */
1311 #ifndef MakeFontsDir
1312 #define MakeFontsDir(deplist)                                           @@\
1313 all:: fonts.dir                                                         @@\
1314                                                                         @@\
1315 fonts.dir:  deplist                                                     @@\
1316         RunProgram(MKFONTDIR,.)                                         @@\
1317                                                                         @@\
1318 clean::                                                                 @@\
1319         RemoveFile(fonts.dir)
1320 #endif /* MakeFontsDir */
1321
1322
1323 /*
1324  * MakeFonts - generate rules to build font database.
1325  */
1326 #ifndef MakeFonts
1327 #define MakeFonts()                                                     @@\
1328 all::  $(OBJS)                                                          @@\
1329                                                                         @@\
1330 MakeFontsDir($(OBJS))                                                   @@\
1331                                                                         @@\
1332 clean::                                                                 @@\
1333         RemoveFiles(*.pcf *.pcf.Z *.pcf.gz)
1334 #endif /* MakeFonts */
1335
1336
1337 /*
1338  * InstallFontObjs - generate rules to install font files
1339  */
1340 #ifndef InstallFontObjs
1341 #define InstallFontObjs(objs,dest)                                      @@\
1342 InstallMultipleFlags(objs,dest,$(INSTDATFLAGS))                         @@\
1343                                                                         @@\
1344 InstallTarget(install,fonts.dir,$(INSTDATFLAGS),dest)
1345 #endif /* InstallFontObjs */
1346
1347
1348 /*
1349  * InstallFonts - generate rules to install font files
1350  */
1351 #ifndef InstallFonts
1352 #define InstallFonts(dest)                                              @@\
1353 InstallFontObjs($(OBJS),dest)
1354 #endif /* InstallFonts */
1355
1356
1357 /*
1358  * InstallFontAliases - generate rules to install font aliases databases. 
1359  */
1360 #ifndef InstallFontAliases
1361 #define InstallFontAliases(dest)                                        @@\
1362 InstallTarget(install,fonts.alias,$(INSTDATFLAGS),dest)
1363 #endif /* InstallFontAliases */
1364
1365 #ifndef FontSrc
1366 #define FontSrc(basename) basename.bdf
1367 #endif
1368
1369 #ifndef FontBaseObj
1370 #define FontBaseObj(basename)basename.pcf
1371 #endif
1372
1373 /*
1374  * InstallFontScale - generate rules to install font scale database.
1375  */
1376 #ifndef InstallFontScale
1377 #define InstallFontScale(dest)                                          @@\
1378 InstallTarget(install,fonts.scale,$(INSTDATFLAGS),dest)
1379 #endif /* InstallFontScale */
1380
1381 /*
1382  * UncompressedFontTarget
1383  */
1384 #ifndef UncompressedFontTarget
1385 #define UncompressedFontTarget(basename)                                @@\
1386 FontBaseObj(basename):  FontSrc(basename)                               @@\
1387         RunProgram(FONTC,$(FONTCFLAGS) $? -o $@)
1388 #endif /* UncompressedFontTarget */
1389
1390 /*
1391  * CompressedFontTarget
1392  */
1393 #ifndef GzipFontCompression
1394 #define GzipFontCompression NO
1395 #endif
1396
1397 #ifndef CompressedFontTarget
1398 #if GzipFontCompression
1399 #define CompressedFontTarget(basename)                                  @@\
1400 FontBaseObj(basename).gz:  FontSrc(basename)                            @@\
1401         RunProgram(FONTC,$(FONTCFLAGS) $?) | $(GZIPCMD) > $@
1402 #else
1403 #define CompressedFontTarget(basename)                                  @@\
1404 FontBaseObj(basename).Z:  FontSrc(basename)                             @@\
1405         RunProgram(FONTC,$(FONTCFLAGS) $?) | $(COMPRESS) > $@
1406 #endif
1407 #endif /* CompressedFontTarget */
1408
1409 #ifdef CompressAllFonts
1410 #define FontTarget(basename) CompressedFontTarget(basename)
1411 #if GzipFontCompression
1412 #define FontObj(basename) FontBaseObj(basename).gz
1413 #else
1414 #define FontObj(basename) FontBaseObj(basename).Z
1415 #endif
1416 #else
1417 #define FontTarget(basename) UncompressedFontTarget(basename)
1418 #define FontObj(basename) FontBaseObj(basename)
1419 #endif /* CompressAllFonts */
1420
1421 /*
1422  * MakeXkbDir
1423  */
1424 #ifndef MakeXkbDir
1425 #define MakeXkbDir(basedir,subdir)                                      @@\
1426 all::   Concat(subdir,.dir)                                             @@\
1427                                                                         @@\
1428 Concat(subdir,.dir):                                                    @@\
1429         $(XKBCOMPCMD) -lfhlpR -o Concat(subdir,.dir) '*'                @@\
1430                                                                         @@\
1431 InstallTarget(install,Concat(subdir,.dir),$(INSTDATFLAGS),basedir)      @@\
1432                                                                         @@\
1433 clean::                                                                 @@\
1434         $(RM) Concat(subdir,.dir)
1435 #endif
1436
1437 /*
1438  * PostProcessTroffPS - by default moves the working output into place,
1439  * but can be a hook for more complicated post-processing.
1440  */
1441 #ifndef PostProcessTroffPS
1442 #define PostProcessTroffPS(temp,real) $(MV) temp real
1443 #endif
1444
1445 #ifndef MakeSimpleDoc
1446 #define MakeSimpleDoc(file,srcs)                                        @@\
1447 all:: file.PS                                                           @@\
1448 .PRECIOUS: file.PS                                                      @@\
1449                                                                         @@\
1450 file.PS: srcs                                                           @@\
1451         -$(TROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw > file.nPS \@@\
1452         && PostProcessTroffPS(file.nPS,$@)                              @@\
1453         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1454                                                                         @@\
1455 file.txt: srcs                                                          @@\
1456         $(NROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw > $@       @@\
1457                                                                         @@\
1458 clean::                                                                 @@\
1459         $(RM) index.raw file.nPS file.PS file.txt
1460 #endif
1461
1462 #ifndef MakeTblDoc
1463 #define MakeTblDoc(file,srcs)                                           @@\
1464 all:: file.PS                                                           @@\
1465 .PRECIOUS: file.PS                                                      @@\
1466                                                                         @@\
1467 file.PS: srcs                                                           @@\
1468         -$(TBL) $(XDOCMACROS) srcs | $(TROFF) $(MSMACROS) 2> index.raw > file.nPS \@@\
1469         && PostProcessTroffPS(file.nPS,$@)                              @@\
1470         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1471                                                                         @@\
1472 file.txt: srcs                                                          @@\
1473         $(TBL) $(XDOCMACROS) srcs | $(NROFF) $(MSMACROS) 2> index.raw | $(COL) > $@     @@\
1474                                                                         @@\
1475 clean::                                                                 @@\
1476         $(RM) index.raw file.nPS file.PS file.txt
1477 #endif
1478
1479 #ifndef MakeEqnDoc
1480 #define MakeEqnDoc(file,srcs)                                           @@\
1481 all:: file.PS                                                           @@\
1482 .PRECIOUS: file.PS                                                      @@\
1483                                                                         @@\
1484 file.PS: srcs                                                           @@\
1485         -$(TBL) $(XDOCMACROS) srcs | $(EQN) | $(TROFF) $(MSMACROS) 2> index.raw > file.nPS \@@\
1486         && PostProcessTroffPS(file.nPS,$@)                              @@\
1487         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1488                                                                         @@\
1489 file.txt: srcs                                                          @@\
1490         $(TBL) $(XDOCMACROS) srcs | $(NEQN) | $(NROFF) $(MSMACROS) 2> index.raw | $(COL) > $@ @@\
1491                                                                         @@\
1492 clean::                                                                 @@\
1493         $(RM) index.raw file.nPS file.PS file.txt
1494 #endif
1495
1496 #ifndef MakeDocIndex
1497 #define MakeDocIndex(file,srcs)                                         @@\
1498 all:: file.idx.PS                                                       @@\
1499                                                                         @@\
1500 file.idx.PS: srcs index.raw                                             @@\
1501         tail -1 index.raw > index.pageno                                @@\
1502         grep '^[1-9]' index.raw | sort -f '-t:' +1 -3 +0n -1n | awk -f $(DOCUTILSRC)/fixindex.awk | awk -f $(DOCUTILSRC)/block.awk > index.troff @@\
1503         cat srcs $(XIDXMACROS) index.troff | $(TROFF) -me > file.idx.nPS \@@\
1504         && $(MV) file.idx.nPS $@                                        @@\
1505         $(RM) index.troff index.pageno                                  @@\
1506                                                                         @@\
1507 clean::                                                                 @@\
1508         $(RM) index.troff index.pageno file.idx.nPS file.idx.PS
1509 #endif
1510
1511 #ifndef MakeLatexDoc
1512 #if HasLatex
1513 #define MakeLatexDoc(file,src)                                          @@\
1514 all:: file.PS                                                           @@\
1515                                                                         @@\
1516 file.dvi: src                                                           @@\
1517         $(LATEX) src                                                    @@\
1518                                                                         @@\
1519 file.PS: file.dvi                                                       @@\
1520         $(DVIPS) -o file.nPS file && $(MV) file.nPS $@                  @@\
1521                                                                         @@\
1522 clean::                                                                 @@\
1523         RemoveFiles(file.nPS file.PS file.dvi file.log)                 @@\
1524         RemoveFiles(file.aux file.toc file.lof file.lot)
1525 #else /* HasLatex */
1526 #define MakeLatexDoc(file,src)                                          @@\
1527 all::                                                                   @@\
1528 file.PS: src                                                            @@\
1529         @echo "cannot make file.PS: no latex on this system"; exit 1
1530 #endif /* HasLatex (else) */
1531 #endif /* MakeLatexDoc */