summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/Imakefile
blob: 4b96fedd03eb36324af8af672a103af3e88f7e3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
XCOMM $TOG: Imakefile /main/249 1997/12/11 11:18:14 kaleb $
/*
 * Server Master Makefile
 */
XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.168 1999/08/14 10:49:21 dawes Exp $

#ifndef InstallXserverSetUID
#define InstallXserverSetUID NO
#endif
#define InstallServerSetUID InstallXserverSetUID

#include <Server.tmpl>

#ifdef XFree86Version
/* Do not strip server binaries */
INSTPGMFLAGS = 
#endif

#define PreFbLibs $(DIX) $(OS) $(XPDDX)
#define PreFbLibsNoFont $(DIX) $(OS)
#define BarePostFbLibs $(MFB) $(XPFBLIBS) $(MI)
#define PostFbLibs BarePostFbLibs $(EXTENSIONS)
#define NoMfbBarePostFbLibs $(XPFBLIBS) $(MI)
#ifndef BuildXinerama
#define NoMfbPostFbLibs NoMfbBarePostFbLibs $(EXTENSIONS)
#else
#define NoMfbPostFbLibs $(EXTENSIONS) NoMfbBarePostFbLibs $(EXTENSIONS)
#endif

#define MFBBareLibs PreFbLibs BarePostFbLibs
#define NoMFBBareLibs PreFbLibs NoMfbBarePostFbLibs
#define MFBLibs PreFbLibs PostFbLibs
#define NoMFBLibs PreFbLibs NoMfbPostFbLibs
#define CFBLibs PreFbLibs $(CFB) PostFbLibs
#define CFB4Libs PreFbLibs $(CFB4) PostFbLibs
#if BuildLowMem
#define LMFCFBLibs PreFbLibs $(LMFCFB) NoMfbBarePostFbLibs $(EXTENSIONS)
#endif
#define CFB8Libs PreFbLibs $(CFB8) PostFbLibs
#define CFB16Libs PreFbLibs $(CFB16) PostFbLibs
#define CFB24Libs PreFbLibs $(CFB24) PostFbLibs
#define CFB32Libs PreFbLibs $(CFB32) PostFbLibs

#define NoMFBCFBLibs PreFbLibs $(CFB) NoMfbPostFbLibs
#define NoMFBCFB8Libs PreFbLibs $(CFB8) NoMfbPostFbLibs

#if BuildPexExt
         PEXLIBS = PEX5/dipex/dispatch/ModuleLibraryTargetName(didipex) \
                   PEX5/dipex/swap/ModuleLibraryTargetName(diswapex) \
                   PEX5/dipex/objects/ModuleLibraryTargetName(diobpex) \
                   PEX5/dipex/dispatch/ModuleLibraryTargetName(didipex) \
                   PEX5/ddpex/mi/level4/ModuleLibraryTargetName(ddpex4) \
                   PEX5/ddpex/mi/level3/ModuleLibraryTargetName(ddpex3) \
                   PEX5/ddpex/mi/shared/ModuleLibraryTargetName(ddpexs) \
                   PEX5/ddpex/mi/level2/ModuleLibraryTargetName(ddpex2) \
                   PEX5/ddpex/mi/level1/ModuleLibraryTargetName(ddpex1) \
		   PEX5/ospex/ModuleLibraryTargetName(ospex) 
          PEXDIR = PEX5
#endif

#if BuildGlxExt
#if GlxStubLib && !DoLoadableServer
      GLXLIB = glxStub/LibraryTargetName(ServerGlx) 
      GLXDIR = glxStub
#else
#if defined(GlxStaticServerLib) && !DoLoadableServer
      GLXLIB = GlxStaticServerLib
      GLXDIR = 
#else
#if BuildXF86DRI
      DRILIB = GL/dri/ModuleLibraryTargetName(dri)
#else
      DRILIB = 
#endif
#if GlxUseSGISI
      GLXLIB = GL/glx/ModuleLibraryTargetName(glx) \
               GL/sgi-si/ModuleLibraryTargetName(GLcore) \
               $(DRILIB)
#else
#if DoLoadableServer
      GLXLIB = GL/glx/ModuleLibraryTargetName(glx) \
               GL/mesa/src/ModuleLibraryTargetName(GLcore)
#else
      GLXLIB = GL/glx/ModuleLibraryTargetName(glx) \
               GL/mesa/src/ModuleLibraryTargetName(GLcore) \
               GL/mesa/src/X/ModuleLibraryTargetName(GLcoreX) \
               $(DRILIB)
#endif
#endif
      GLXDIR = GL
      GLXEXT = $(GLXLIB)
#endif
#endif
#endif

#if BuildXInputExt
      XINPUTEXT = Xi/LibraryTargetName(xinput)
          XIDIR = Xi
#endif
#if BuildXIE 
      XIEEXT = XIE/dixie/ModuleLibraryTargetName(dixie) XIE/mixie/ModuleLibraryTargetName(mixie)
#endif
#if BuildXIE || BuildXIElib
      XIEDIR = XIE
#endif
#if BuildXKB
      XKBEXT = xkb/LibraryTargetName(xkb)
      XKBDIR = xkb
#endif
#if BuildLBX
         LBXEXT = lbx/LibraryTargetName(lbx) \
                  $(TOP)/lib/lbxutil/LibraryTargetName(lbxutil)
        LBXDIRS = lbx
#endif
#if BuildDBE
         DBEEXT = dbe/LibraryTargetName(dbe)
#endif
#if BuildDBE || BuildDBElib
         DBEDIR = dbe
#endif
#if BuildRECORD
         RECORDEXT = record/LibraryTargetName(record)
#endif
#if BuildRECORD || BuildRECORDlib
         RECORDDIR = record
#endif
#ifdef SiteExtensionLibs
     SITEEXTS = SiteExtensionLibs
#endif
#ifdef SiteExtensionDirs
     SITEEXTDIRS = SiteExtensionDirs
#endif
#if DoLoadableServer && HasDlopen
        LIBDL = DlLibrary
#endif
     LIBREGEX = RegexLibrary

#if DoLoadableServer
  LIBCWRAPPER = os/libcwrapper.o
#endif

#if BuildXprint

#ifndef XpRasterDDX
#define XpRasterDDX NO
#endif
#ifndef XpColorPclDDX
#define XpColorPclDDX YES
#endif
#ifndef XpMonoPclDDX
#define XpMonoPclDDX NO
#endif
#ifndef XpPostScriptDDX
#define XpPostScriptDDX YES
#endif

#if XpRasterDDX
XPRASTLIB = Xprint/raster/LibraryTargetName(raster)
#endif
#if XpColorPclDDX
XPPCLLIB = Xprint/pcl/LibraryTargetName(pcl)
#endif
#if XpMonoPclDDX
XPMPCLLIB = Xprint/pcl-mono/LibraryTargetName(pcl)
#endif
#if XpPostScriptDDX
XPPSLIB = Xprint/ps/LibraryTargetName(ps)
#endif

XPDDXLIBS = Xprint/LibraryTargetName(printer) $(XPRASTLIB) $(XPPCLLIB) $(XPMPCLLIB) $(XPPSLIB)
XPDDXFBLIBS = $(MFB) $(CFB32)
#if !PrintOnlyServer
      XPFBLIBS = $(XPDDXFBLIBS)
      XPDDX = $(XPDDXLIBS)
#endif
      XPDDXDIR = Xprint
#endif
#if !BuildXprint || PrintOnlyServer
XPFBLIBS = dix/LibraryTargetName(xpstubs)
#endif

#if DoLoadableServer
     EXTENSIONS = $(OTHEREXTS) 
   LOADABLEEXTS = $(PEXLIBS) $(XIEEXT) $(MISCEXT) $(DBEEXT) $(RECORDEXT) \
                  $(GLXEXT)
        MISCEXT = Xext/LibraryTargetName(ext)
      OTHEREXTS = Xext/LibraryTargetName(exts) $(XKBEXT) $(XINPUTEXT) \
                  $(LBXEXT) $(SITEEXTS)
#else
     EXTENSIONS = $(OTHEREXTS) $(PEXLIBS) $(GLXEXT)
      OTHEREXTS = Xext/LibraryTargetName(ext) $(XKBEXT) $(XINPUTEXT) \
                  $(XIEEXT) $(LBXEXT) $(DBEEXT) $(RECORDEXT) $(SITEEXTS)
#endif
        EXTDIRS = Xext $(XKBDIR) $(XIDIR) $(XIEDIR) $(PEXDIR) $(GLXDIR) \
                  $(LBXDIRS) $(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS)
         XAULIB = $(XAUTHSRC)/LibraryTargetName(Xau)
       XDMCPLIB = $(XDMCPLIBSRC)/LibraryTargetName(Xdmcp)
#if BuildLBX || GzipFontCompression
           ZLIB = GzipLibrary
#endif
             OS = os/LibraryTargetName(os) $(XAULIB) $(XDMCPLIB)
        BSDEMUL = $(DEPXBSDLIB)
#if DoLoadableServer
            MFB = mfb/ModuleLibraryTargetName(mfb)
            CFB = cfb/ModuleLibraryTargetName(cfb) \
		  cfb16/ModuleLibraryTargetName(cfb16) \
		  cfb24/ModuleLibraryTargetName(cfb24) \
		  cfb32/ModuleLibraryTargetName(cfb32)
           CFB8 = cfb/ModuleLibraryTargetName(cfb)
           CFB4 = cfb/ModuleLibraryTargetName(cfb) \
		  cfb4/ModuleLibraryTargetName(cfb4)
          CFB16 = cfb/ModuleLibraryTargetName(cfb) \
		  cfb16/ModuleLibraryTargetName(cfb16)
          CFB24 = cfb/ModuleLibraryTargetName(cfb) \
		  cfb24/ModuleLibraryTargetName(cfb24)
          CFB32 = cfb/ModuleLibraryTargetName(cfb) \
		  cfb32/ModuleLibraryTargetName(cfb32)
#else 
            MFB = mfb/LibraryTargetName(mfb)
            CFB = cfb/LibraryTargetName(cfb) cfb16/LibraryTargetName(cfb16) \
		  cfb24/LibraryTargetName(cfb24) cfb32/LibraryTargetName(cfb32)
           CFB8 = cfb/LibraryTargetName(cfb)
           CFB4 = cfb/LibraryTargetName(cfb) cfb4/LibraryTargetName(cfb4)
          CFB16 = cfb/LibraryTargetName(cfb) cfb16/LibraryTargetName(cfb16)
          CFB24 = cfb/LibraryTargetName(cfb) cfb24/LibraryTargetName(cfb24)
          CFB32 = cfb/LibraryTargetName(cfb) cfb32/LibraryTargetName(cfb32)
#endif
#if BuildLowMem
         LMFCFB = lmfcfb/LibraryTargetName(cfb)
#endif
             MI = mi/LibraryTargetName(mi)
   MIINITEXTOBJ = mi/miinitext.o
            DIX = dix/LibraryTargetName(dix)
       FONTBASE = $(FONTLIBSRC)/fontbase.o \
		  $(FONTLIBSRC)/LibraryTargetName(fontbase)
           FONT = $(XFONTLIB) $(XPFBLIBS)
       FONTLIBS = $(LDPRELIB) $(FONT)
#ifdef ServerExtraSysLibs
   EXTRASYSLIBS = ServerExtraSysLibs
#endif
#if SystemV4 || defined(SGIArchitecture) || UseRgbTxt
        SYSLIBS = $(ZLIB) MathLibrary Krb5Libraries $(EXTRASYSLIBS)
#else
        SYSLIBS = $(ZLIB) MathLibrary Krb5Libraries DBMLibrary $(EXTRASYSLIBS)
#endif
           CBRT = mi/LibraryTargetName(cbrt)
        STDDIRS = include dix os mi $(XPDDXDIR) $(EXTDIRS)

XCOMM
XCOMM This turns off the default rule for compiling .c files because
XCOMM this makefile does not really know how to build it.  This is really
XCOMM just a hack because of the Sun version of make and nfs.
XCOMM
.c.o:

.s.o:

/*  		  Build rule blocks, add one for each server
 *  
 *  If a server needs mfb, its build block should have a line like:
 *  MFBDIR = mfb
 *  Similarly, its build block should have:
 *  CFB4DIR  = cfb4  (if the server needs 4 bit cfb)
 *  CFB8DIR  = cfb   (8 bit cfb)
 *  CFB16DIR = cfb16 (16 bit cfb)
 *  CFB24DIR = cfb24 (24 bit cfb)
 *  CFB32DIR = cfb32 (32 bit cfb)
 *  
 *  If a server does not need all of the above components, simply
 *  omit the relevant lines from the build block.
 *  
 *  Additional ddx directories can be split across three variables:
 *  DDXDIR1, DDXDIR2, and DDXDIR3.  Most servers only use DDXDIR1,
 *  but if two servers can be built on a platform then DDXDIR1 is
 *  typically set to the ddx directories that are shared by both
 *  servers, DDXDIR2 is the directories unique to one of the servers,
 *  and DDXDIR3 is the directories unique to the other server.
 *  
 *  If these guidelines are followed, a make at the top of the server
 *  tree should result in each subdirectory being built only once,
 *  even if multiple servers that share subdirectories are being built.
 */

#if BuildLowMem
LMFCFBDIR = lmfcfb
#endif

#if XdecServer
XCOMM
XCOMM Digital MIPS based WS server (ultrix 4.2 and beyond)
XCOMM
MFBDIR  = mfb
CFB8DIR = cfb
DDXDIR1 = hw/dec/ws
#if BuildLowMem
DECDIRS = $(STDDIRS) $(LMFCFBDIR) $(DDXDIR1) $(DEPDIRS)
#else
DECDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS)
#endif
DECOBJS = hw/dec/ws/init.o hw/dec/ws/sdepthinit.o
#if BuildLowMem
DECLIBS = hw/dec/ws/LibraryTargetName(dec) LMFCFBLibs
#else
DECLIBS = hw/dec/ws/LibraryTargetName(dec) CFB8Libs
#endif
ServerTarget(Xdec,$(DECDIRS),$(DECOBJS),$(DECLIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xdec
#endif
#endif /* XdecServer */


#if XdecMultiDepthServer
XCOMM
XCOMM Digital MIPS based WS server (ultrix 4.2 and beyond)
XCOMM Supports 8, 12, and 24 bit pixmaps
XCOMM
MFBDIR   = mfb
CFB8DIR  = cfb
CFB16DIR = cfb16
CFB24DIR = cfb24
CFB32DIR = cfb32
DDXDIR1  = hw/dec/ws
DECDIRS1 = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(DDXDIR1) $(DEPDIRS)
DECOBJS1 = hw/dec/ws/init.o hw/dec/ws/mdepthinit.o
DECLIBS1 = hw/dec/ws/LibraryTargetName(dec) CFBLibs
ServerTarget(Xdec_md,$(DECDIRS1),$(DECOBJS1),$(DECLIBS1),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xdec_md
#endif
#endif /* XdecMultiDepthServer */


#if XsunServer
XCOMM
XCOMM Sun server
XCOMM
MFBDIR  = mfb
CFB8DIR = cfb
DDXDIR1 = hw/sun
#ifndef AmoebaArchitecture
SUNOBJS = hw/sun/sunInit.o
#else
SUNOBJS = hw/sun/sunInitColor.o
#endif
#if BuildLowMem
SUNDIRS = $(STDDIRS) $(LMFCFBDIR) $(DDXDIR1) $(DEPDIRS)
SUNLIBS = hw/sun/LibraryTargetName(sun) LMFCFBLibs
#else
SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS)
SUNLIBS = hw/sun/LibraryTargetName(sun) CFB8Libs
#endif
SUNSYSLIBS = $(FONTLIBS) $(WIDECHARSYSLIB) $(SYSLIBS)
SetUIDServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS),$(SUNLIBS),$(SUNSYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xsun
#endif
#endif /* XsunServer */


#if Xsun24Server
XCOMM
XCOMM Sun multiple pixmap depth (8, 12, 24) server
XCOMM
MFBDIR = mfb
CFB8DIR = cfb
CFB16DIR = cfb16
CFB24DIR = cfb24
CFB32DIR = cfb32
DDXDIR1 = hw/sun
SUN24DIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(DDXDIR1) $(DEPDIRS)
SUN24OBJS = hw/sun/sunInitMulti.o
SUN24LIBS = hw/sun/LibraryTargetName(sun) CFBLibs
SetUIDServerTarget(Xsun24,$(SUN24DIRS),$(SUN24OBJS),$(SUN24LIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xsun24
#endif
#endif /* Xsun24Server */


#if XsunMonoServer
XCOMM
XCOMM Sun monochrome server
XCOMM
MFBDIR = mfb
DDXDIR1 = hw/sun
SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS)
SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o
SUNMLIBS = hw/sun/LibraryTargetName(sun) MFBBareLibs $(OTHEREXTS)
SetUIDServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS),$(SUNMLIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall XsunMono
#endif
#endif /* XsunMonoServer */


#if XsunAmoebaServer
XCOMM
XCOMM Sun server for Amoeba
XCOMM
MFBDIR = mfb
CFB8DIR = cfb
DDXDIR1 = hw/sunAmoeba
SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS)
SUNOBJS = hw/sunAmoeba/sunInitColor.o
SUNLIBS = hw/sunAmoeba/LibraryTargetName(sun) CFB8Libs
ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS),$(SUNLIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xsun
#endif
#endif /* XsunAmoebaServer */


#if XsunAmoebaMonoServer
XCOMM
XCOMM Sun monochrome server for Amoeba
XCOMM
MFBDIR = mfb
DDXDIR1 = hw/sunAmoeba
SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS)
SUNMOBJS = hw/sunAmoeba/sunInitMono.o hw/sunAmoeba/sunInExMono.o
SUNMLIBS = hw/sunAmoeba/LibraryTargetName(sun) MFBBareLibs $(OTHEREXTS)
ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS),$(SUNMLIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall XsunMono
#endif
#endif /* XsunAmoebaMonoServer */


#if XsunLynxServer
XCOMM
XCOMM Sun server for LynxOS microSPARC 2.4.0
XCOMM
MFBDIR = mfb
CFB8DIR = cfb
DDXDIR1 = hw/sunLynx
SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS)
SUNOBJS = hw/sunLynx/sunLyInit.o
SUNLIBS = hw/sunLynx/libsun.a CFB8Libs
ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS),$(SUNLIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xsun
#endif
#endif /* XsunLynxServer */


#if XsunLynxMonoServer
XCOMM
XCOMM Sun monochrome server for LynxOS microSPARC 2.4.0
XCOMM
MFBDIR = mfb
DDXDIR1 = hw/sunLynx
SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS)
SUNMOBJS = hw/sunLynx/sunInitMono.o hw/sunLynx/sunInExMono.o
SUNMLIBS = hw/sunLynx/libsun.a MFBBareLibs $(OTHEREXTS)
ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS),$(SUNMLIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall XsunMono
#endif
#endif /* XsunLynxMonoServer */


#if XibmServer
XCOMM
XCOMM IBM server
XCOMM
#if SpecialMalloc
IBMALLOCLIB = hw/ibm/common/LibraryTargetName(ibmalloc)
#else
IBMALLOCLIB =
#endif
MFBDIR  = mfb
CFB8DIR = cfb
DDXDIR1 = hw/ibm
IBMDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS)
IBMOBJS = hw/ibm/common/ibmcomm.o hw/ibm/common/ibmDate.o
IBMLIBS = hw/ibm/AIX/hft.o hw/ibm/LibraryTargetName(ibm) $(IBMALLOCLIB) CFB8Libs
ServerTarget(Xibm,$(IBMDIRS),$(IBMOBJS),$(IBMLIBS),$(FONTLIBS) $(SYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xibm
#endif
#endif /* XibmServer */


#if XhpServer
XCOMM
XCOMM Hewlett Packard CFB Server
XCOMM
MFBDIR  = mfb
CFB8DIR = cfb
CFB32DIR = cfb32
DDXDIR1 = hw/hp
HPOBJS = hw/hp/hp.o
#if BuildLowMem
HPSUBDIRS = $(STDDIRS) $(LMFCFBDIR) $(DDXDIR1) $(DEPDIRS)
HPLIBS = LMFCFBLibs
#else
HPSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB32DIR) $(DDXDIR1) $(DEPDIRS)
HPLIBS = CFB32Libs
#endif
HPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS)
ServerTarget(Xhp,$(HPSUBDIRS),$(HPOBJS),$(HPLIBS),$(HPSYSLIBS))
#ifndef ServerToInstall
#define ServerToInstall Xhp
#endif
#endif	/* XhpServer */


#if HasParallelMake
XCOMM
XCOMM force non-parallel build of XF86 servers to prevent MUTEX overrides
XCOMM
#if XF86Server
XF86SERVER = XFree86
#endif
#if XnestServer && !MakeDllModules
XNEST = Xnest
#endif
#if XVirtualFramebufferServer && !MakeDllModules
XVFB = Xvfb
#endif
#if defined(XF86Server) || (!MakeDllModules &&
    (defined(XnestServer) || defined(XVirtualFramebufferServer)))
MakeMutex($(XF86SERVER) $(XNEST) $(XVFB))
#endif
MakeMutex($(STDDIRS) mfb cfb cfb16 cfb32)
#endif


#if XF86Server
XCOMM
XCOMM XFree86 Server
XCOMM
MFBDIR  = mfb
CFB8DIR = cfb
CFB16DIR = cfb16
CFB24DIR = cfb24
CFB32DIR = cfb32
#if XF86AFB
AFBDIR = afb
#endif
DDXDIR1  = hw/xfree86
XF86SERVERSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(AFBDIR) $(DDXDIR1) $(DEPDIRS)
XF86INIT   = $(XF86COMSRC)/xf86Init.o $(XF86COMSRC)/xf86IniExt.o
XF86COMLIB = $(XF86COMSRC)/LibraryTargetName(xf86)
XF86PARSLIB= $(XF86PARSERSRC)/LibraryTargetName(xf86config)
XF86OSLIB  = $(XF86OSSRC)/LibraryTargetName(xf86_os)
XF86HWLIB  = $(XF86HWSRC)/LibraryTargetName(common_hw)
#if XF86XAA
XF86XAALIB = $(XF86SRC)/xaa/LibraryTargetName(xaa)
#endif
#if XF86VgaHw
XF86VGAHWLIB = $(XF86SRC)/vgahw/LibraryTargetName(vgahw)
#endif
#if XF86FBDevHw
XF86FBDEVHWLIB = $(XF86SRC)/fbdevhw/LibraryTargetName(fbdevhw)
#endif
#if XF1Bpp || XF4Bpp
XF1BPPLIB = $(XF86SRC)/xf1bpp/LibraryTargetName(xf1bpp)
#endif
#if XF4Bpp
XF4BPPLIB = $(XF86SRC)/xf4bpp/LibraryTargetName(xf4bpp)
#endif
#if XF8_32Bpp
XF8_32BPPLIB = $(XF86SRC)/xf8_32bpp/LibraryTargetName(xf8_32bpp)
#endif
#if XF8_16Bpp
XF8_16BPPLIB = $(XF86SRC)/xf8_16bpp/LibraryTargetName(xf8_16bpp)
#endif
#if XF24_32Bpp
XF24_32BPPLIB = $(XF86SRC)/xf24_32bpp/LibraryTargetName(xf24_32bpp)
#endif
#if XFShadowFB
XFSHADOWFBLIB = $(XF86SRC)/shadowfb/LibraryTargetName(shadowfb)
#endif
#if XF86AFB
AFBLIB = afb/LibraryTargetName(afb)
#endif
XF86DRIVERLIB = $(XF86SRC)/drivers/LibraryTargetName(driver)
#if XF86Ramdac
XF86RAMDACLIB = $(XF86SRC)/ramdac/LibraryTargetName(ramdac)
#endif
#if XF86I2C
XF86I2CLIB = $(XF86SRC)/i2c/LibraryTargetName(i2c)
#endif
#if XF86DDC
XF86DDCLIB = $(XF86SRC)/ddc/LibraryTargetName(ddc)
#endif
#if XF86RAC
XF86RACLIB = $(XF86SRC)/rac/LibraryTargetName(rac)
#endif
XF86IDRIVERLIB = $(XF86SRC)/input/LibraryTargetName(idriver)
#if !DoLoadableServer
XF86DRVOBJS = $(XF86SRC)/drivers/drvConf.o
XF86DRVLIBS = $(XF86DRIVERLIB) $(XF86RAMDACLIB) $(XF86DDCLIB) $(XF86I2CLIB) \
              $(XF86XAALIB) $(XF86VGAHWLIB) $(XF86FBDEVHWLIB) \
              $(XF8_32BPPLIB) $(XF8_16BPPLIB) $(XF24_32BPPLIB) \
	      $(XF4BPPLIB) $(XF1BPPLIB) $(XFSHADOWFBLIB) $(AFBLIB)
XF86IDRVOBJS = $(XF86SRC)/input/drvConf.o
XF86IDRVLIBS = $(XF86IDRIVERLIB)
XF86SCANLIB = $(XF86SRC)/scanpci/LibraryTargetName(scanpci)
XF86LIBS  = $(XF86INIT) $(XF86COMLIB) $(XF86RACLIB) $(XF86PARSLIB) $(XF86OSLIB)
#else
XF86LIBS  = $(XF86INIT) $(XF86COMLIB) $(XF86PARSLIB) $(XF86OSLIB) 
#endif
#if DoLoadableServer
XF86LOADERLIB = $(XF86SRC)/loader/LibraryTargetName(loader)
XF86MAINLIBS = PreFbLibsNoFont $(FONTBASE) $(OTHEREXTS) $(XF86COMLIB) \
	       NoMfbPostFbLibs
XF86SERVERSYSLIBS = $(SYSLIBS) $(LIBDL) $(LIBREGEX)
/* Mouse driver */
XF86IDRVOBJS = $(XF86SRC)/input/mouse/mouse_drv.o
#else
XF86MAINLIBS = CFBLibs $(XF86COMLIB) $(MI)
XF86SERVERSYSLIBS = $(FONTLIBS) $(SYSLIBS) $(LIBDL) $(LIBREGEX)
#endif
XF86SERVEROBJS = $(XF86DRVOBJS) $(XF86IDRVOBJS)
XF86SERVERLIBS = $(XF86DRVLIBS) $(XF86IDRVLIBS) $(XF86LIBS) $(XF86LOADERLIB) \
		 $(XF86COMLIB) $(XF86MAINLIBS) $(XF86SCANLIB) $(XF86OSLIB)
#if HasParallelMake
MakeMutex($(XF86SERVERSUBDIRS) $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS))
#endif
#if HasGnuMake
$(XF86SERVERLIBS) $(XF86SERVERSYSLIBS):: $(XF86SERVERSUBDIRS)
	@if [ -f $@ ]; then touch $@; fi
#endif
SetUIDServerTarget(XFree86,$(XF86SERVERSUBDIRS),$(XF86SERVEROBJS),$(XF86SERVERLIBS),$(XF86SERVERSYSLIBS))
#if DoLoadableServer
ServerDriverSDKTarget(XFree86)
#endif
#ifndef ServerToInstall
#define ServerToInstall XFree86
#endif
#endif        /* XF86Server */


#if XprtServer && !MakeDllModules
XCOMM
XCOMM Print Server
XCOMM
MFBDIR  = mfb
CFB8DIR = cfb
CFB32DIR = cfb32
XPSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB32DIR) $(DEPDIRS)
#if PrintOnlyServer
#if BuildXinerama
XPPANSTUBOBJS = Xprint/panoramiXstubs.o
#endif
#if BuildDPMS
XPDPMSSTUBOBJS = Xprint/dpmsstubs.o
#endif
XPOBJS = Xprint/ddxInit.o Xprint/miinitext.o $(XPPANSTUBOBJS) $(XPDPMSSTUBOBJS)
XPLIBS = PreFbLibs $(XPDDXLIBS) $(XPDDXFBLIBS) PostFbLibs
#else
XPOBJS = Xprint/ddxInit.o
XPLIBS = PreFbLibs PostFbLibs
#endif
#if (defined(SunArchitecture) || defined(SparcArchitecture)) && defined(SVR4Architecture)
XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) -lw
#else
XPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS)
#endif
#if HasParallelMake
MakeMutex($(XPSUBDIRS) $(XPOBJS) $(XPLIBS) $(XPSYSLIBS))
#endif
#if HasGnuMake
$(XPOBJS) $(XPLIBS) $(XPSYSLIBS):: $(XPSUBDIRS)
	@if [ -f $@ ]; then touch $@; fi
#endif
ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS),$(XPLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XPSYSLIBS))
#endif	/* XprtServer */

#if XnestServer && !MakeDllModules
XCOMM
XCOMM Server with Xlib-based ddx
XCOMM
#ifndef Win32Architecture
XNESTDDXDIR = hw/xnest
#else
XNESTDDXDIR = hw
#endif
XNESTDIRS = $(STDDIRS) $(XNESTDDXDIR) $(DEPDIRS)
#if !defined(LynxOSArchitecture) && !defined(Win32Architecture)
XNESTOBJS = hw/xnest/miinitext.o
#else
XNESTOBJS = hw/xnest/miinitext.o dix/main.o
#endif
XNEST = hw/xnest/LibraryTargetName(xnest)
#if DoLoadableServer
XNESTLIBS = PreFbLibs $(XNEST) NoMfbPostFbLibs $(XNEST)
#else
XNESTLIBS = PreFbLibs $(XNEST) NoMfbPostFbLibs $(XF86OSLIB) $(XNEST)
#endif
XNESTSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS)
#if HasParallelMake
MakeMutex($(XNESTDIRS) $(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS))
#endif
#if HasGnuMake
$(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS):: $(XNESTDIRS)
	@if [ -f $@ ]; then touch $@; fi
#endif
ServerTarget(Xnest,$(XNESTDIRS),$(XNESTOBJS), \
	$(XNESTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XNESTSYSLIBS))
#endif /* XnestServer */


#if XnonServer
XCOMM
XCOMM non server, just compile sources for build test
XCOMM
MFBDIR   = mfb
CFB8DIR  = cfb
CFB16DIR = cfb16
CFB32DIR = cfb32
#if HasParallelMake
MakeMutex($(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB32DIR) $(DEPDIRS))
#endif
Xnon: $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB32DIR) $(DEPDIRS)
#endif /* XnonServer */


#if XVirtualFramebufferServer && !MakeDllModules
XCOMM
XCOMM server with Virtual (malloced) framebuffer
XCOMM
MFBDIR   = mfb
CFB8DIR  = cfb
CFB16DIR = cfb16
CFB24DIR = cfb24
CFB32DIR = cfb32
#ifndef Win32Architecture
XVFBDDXDIR = hw/vfb
#else
XVFBDDXDIR = hw
#endif
XVFBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(XVFBDDXDIR) $(DEPDIRS)
#ifndef Win32Architecture
#if BuildXinerama
XVFBPANSTUBOBJS = hw/vfb/panoramiXstubs.o
#endif
#if BuildDPMS
XVFBDPMSSTUBOBJS = hw/vfb/dpmsstubs.o
#endif
XVFBOBJS = hw/vfb/stubs.o hw/vfb/miinitext.o $(XVFBPANSTUBOBJS) $(XVFBDPMSSTUBOBJS)
#else
XVFBOBJS = dix/main.o hw/vfb/stubs.o hw/vfb/miinitext.o
#endif
XVFB = hw/vfb/LibraryTargetName(vfb)
#if DoLoadableServer
XVFBLIBS = PreFbLibs $(XVFB) $(CFB) PostFbLibs $(MI)
#else
XVFBLIBS = PreFbLibs $(XVFB) $(CFB) PostFbLibs $(XF86OSLIB) $(MI)
#endif
XVFBSYSLIBS = $(FONTLIBS) $(SYSLIBS)
#if HasParallelMake
MakeMutex($(XVFBDIRS) $(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS))
#endif
#if HasGnuMake
$(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS):: $(XVFBDIRS)
	@if [ -f $@ ]; then touch $@; fi
#endif
ServerTarget(Xvfb,$(XVFBDIRS),$(XVFBOBJS), \
	$(XVFBLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XVFBSYSLIBS))
#endif /* XVirtualFramebufferServer */


CFBDIRS = $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR)
IPLANDIRS = $(IPLAN2P2DIR) $(IPLAN2P4DIR) $(IPLAN2P8DIR)
DDXDIRS = $(DDXDIR1) $(DDXDIR2) $(DDXDIR3) $(XVFBDDXDIR) $(XNESTDDXDIR)
SUBDIRS = $(STDDIRS) $(MFBDIR) $(CFBDIRS) $(IPLANDIRS) $(ILBMDIR) $(AFBDIR) \
          $(LMFCFBDIR) $(DDXDIRS)

#if defined(ServerToInstall) && !defined(OS2Architecture)
install::
	-(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) ServerToInstall X)
#endif

#define IHaveSubdirs

DependSubdirs($(SUBDIRS))
MakeLintLibSubdirs($(SUBDIRS))
LintSubdirs($(SUBDIRS))

ForceSubdirs($(DEPDIRS) $(SUBDIRS))

InstallManPage(Xserver,$(MANDIR))