Imake.tmpl 49.2 KB
Newer Older
daryll's avatar
daryll committed
1
2
XCOMM ----------------------------------------------------------------------
XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
dawes's avatar
dawes committed
3
XCOMM $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $
daryll's avatar
daryll committed
4
5
6
7
XCOMM
XCOMM
XCOMM
XCOMM
alanh's avatar
alanh committed
8
XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.139 2003/01/28 22:06:08 alanh Exp $
daryll's avatar
daryll committed
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
XCOMM ----------------------------------------------------------------------

/*
 * generic imake template
 */

/*
 * Modify Imake.cf when adding a new architecture, do not modify this file.
 * Platform-specific parameters may be set in the appropriate <vendor>.cf
 * configuration files.  Site-specific parameters should be set in the file
 * site.def.  Full rebuilds are recommended if any parameters are changed.
 * If your C preprocessor does not define any unique symbols, you will need
 * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
 * "make World" the first time).
 */

#define ImakeConfigRelease 6

#define	YES	1
#define NO	0

/* Ensure that "all" is the default target in the Makefile. */
all::

.SUFFIXES: .i

dawes's avatar
dawes committed
35
36
37
38
/* Intercept clean rules for current directory */
#undef clean
#define clean cleandir

daryll's avatar
daryll committed
39
40
41
42
43
44
45
46
47
#include <Imake.cf>

XCOMM -----------------------------------------------------------------------
XCOMM site-specific configuration parameters that need to come before
XCOMM the platform-specific parameters - edit site.def to change
#define BeforeVendorCF
#include <site.def>
#undef BeforeVendorCF

alanh's avatar
alanh committed
48
49
50
#if defined(HasGcc3) && !defined(HasGcc2)
# define HasGcc2 HasGcc3
#endif
daryll's avatar
daryll committed
51
52
53
54
#if defined(HasGcc2) && !defined(HasGcc)
# define HasGcc HasGcc2
#endif

alanh's avatar
alanh committed
55
56
57
58
59
60
61
#ifndef HasCenterLineC
#define HasCenterLineC NO
#endif
#ifndef HasCenterLineCplusplus
#define HasCenterLineCplusplus NO
#endif

daryll's avatar
daryll committed
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
#ifndef HasClearmake
# define HasClearmake NO
#endif

/*
 * ClearmakeOSName - insert the current OS type into the clearmake
 * build script, so .o files from different platforms cannot be winked in.
 * If clearmake finds the build script for two .o files is the same, it
 * will share the .o, even across different architectures.  Inserting the
 * O/S name into the build script in a comment prevents unwanted sharing.
 * Note the trailing double-@ in the macro: end a line using this macro
 * with backslash without the double-@ usually used.
 * Like this:
 *
 * #define SomeRule() @@\
 *     something or other @@\
 *     ClearmakeOSName \
 *     something else @@\
 *     and more
 */
#ifndef ClearmakeOSName
# if HasClearmake
#  define ClearmakeOSName @ XCOMM $(OSNAME) @@
# else
#  define ClearmakeOSName /**/
# endif
#endif

#if HasClearmake
# ifndef MakeCmd
#  define MakeCmd clearmake
# endif
#endif

#if HasClearmake
XCOMM ----------------------------------------------------------------------
.c.o:
	ClearmakeOSName	$(CC) -c $(CFLAGS) $*.c
#endif

XCOMM ----------------------------------------------------------------------
XCOMM platform-specific configuration parameters - edit MacroFile to change
#include MacroIncludeFile

XCOMM ----------------------------------------------------------------------
XCOMM site-specific configuration parameters that go after
XCOMM the platform-specific parameters - edit site.def to change
#define AfterVendorCF
#include <site.def>
#undef AfterVendorCF

/*
 * defaults for various generic parameters; set in site.def if needed
 */

/* the following are needed before we can include Imake.rules */

alanh's avatar
alanh committed
119
120
121
122
#ifndef NothingOutsideProjectRoot
#define NothingOutsideProjectRoot NO
#endif

daryll's avatar
daryll committed
123
124
125
#ifndef HasVarDirectory
#define HasVarDirectory		YES
#endif
kem's avatar
kem committed
126
127
128
#ifndef UseEtcX11
#define UseEtcX11		YES
#endif
alanh's avatar
alanh committed
129
130
131
132
133
134
135
#ifndef UseInstalledX11
# define UseInstalledX11        NO
#endif
#ifdef UseInstalled
# undef UseInstalledX11
# define UseInstalledX11        YES
#endif
alanh's avatar
alanh committed
136
137
138
139
#if NothingOutsideProjectRoot
#undef UseEtcX11
#define UseEtcX11		NO
#endif
kem's avatar
kem committed
140
141
142
#ifndef UseSeparateConfDir
#define UseSeparateConfDir	(UseEtcX11 || HasVarDirectory)
#endif
alanh's avatar
alanh committed
143
144
145
146
#if NothingOutsideProjectRoot
#undef UseSeparateConfDir
#define UseSeparateConfDir	NO
#endif
daryll's avatar
daryll committed
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#ifndef SystemV
#define SystemV			NO	/* SYSV (R3) */
#endif
#ifndef SystemV4
#define SystemV4		NO	/* SVR4 */
#endif
#ifndef HasCodeCenter
#define HasCodeCenter		NO
#endif
#ifndef HasSentinel
#define HasSentinel		NO
#endif
#ifndef HasPurify
#define HasPurify		NO
#endif
#ifndef HasTestCenter
#define HasTestCenter		NO
#endif
#ifndef HasGnuMake
#define HasGnuMake		NO
#endif
jhartmann's avatar
jhartmann committed
168
169
170
171
172
173
/*
 * The following fixes a glitch with GNU make -j
 */
#ifndef ForceServerRemake
#define ForceServerRemake	HasGnuMake
#endif
daryll's avatar
daryll committed
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
#ifndef HasBsdMake
#define HasBsdMake		NO
#endif
#ifndef HasParallelMake
#define HasParallelMake		NO
#endif
#ifndef RemoveTargetProgramByMoving
#define RemoveTargetProgramByMoving NO
#endif
#ifndef DoRanlibCmd
#if SystemV || SystemV4
#define DoRanlibCmd NO
#else
#define DoRanlibCmd YES
#endif
#endif
#ifndef ExecableScripts
#if SystemV
#define ExecableScripts		NO
#else
#define ExecableScripts		YES	/* kernel exec() can handle #! */
#endif
#endif

#ifndef HasMakefileSafeInclude	    /* -include or sinclude in a Makefile */
#if HasClearmake || HasBsdMake
#define HasMakefileSafeInclude	YES
#else
#define HasMakefileSafeInclude	NO   /* see also vendor-specific .cf files */
#endif
#endif

kem's avatar
kem committed
206
207
#ifndef HasSymLinks
#define HasSymLinks YES
daryll's avatar
daryll committed
208
209
#endif

dawes's avatar
dawes committed
210
211
212
213
#ifndef HasPerl
#define HasPerl			YES
#endif

dawes's avatar
dawes committed
214
215
216
217
#ifndef HasPerl5
#define HasPerl5		HasPerl
#endif

dawes's avatar
dawes committed
218
219
220
221
222
223
224
225
#ifndef PerlCmd
#define PerlCmd			perl
#endif

#ifndef PerlOptions
#define PerlOptions		/**/
#endif

alanh's avatar
alanh committed
226
227
228
229
#ifndef BuildRman
#define BuildRman YES
#endif

dawes's avatar
dawes committed
230
231
232
233
234
235
236
237
#ifndef HasGperf
#define HasGperf		NO
#endif

#ifndef GperfCmd
#define GperfCmd		gperf
#endif

alanh's avatar
alanh committed
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
#ifndef RmanCmd
#if BuildRman
#ifdef UseInstalled		/* assume BINDIR in path */
#define RmanCmd rman
#else
#define RmanCmd $(TOP)/config/util/rman
#endif
#endif
#endif

#ifndef RmanOptions
#if BuildRman
#define RmanOptions -f HTML
#endif
#endif

#ifndef BuildHtmlManPages
#ifdef RmanCmd
#define BuildHtmlManPages YES
#else
#define BuildHtmlManPages NO
#endif
#endif
/* Can't do this while bootstrapping imake */
#ifdef BootStrap
#undef BuildHtmlManPages
#define BuildHtmlManPages NO
#endif

dawes's avatar
dawes committed
267
268
269
270
271
272
273
274
#ifndef DontPreprocessManPages
#ifdef UseInstalled
#define DontPreprocessManPages YES
#else
#define DontPreprocessManPages NO
#endif
#endif

alanh's avatar
alanh committed
275
276
277
278
#ifndef CompressManPages
#define CompressManPages NO
#endif

dawes's avatar
dawes committed
279
280
281
282
#ifndef HasGroff
#define HasGroff NO
#endif

dawes's avatar
dawes committed
283
284
285
286
#ifndef HasCookieMaker
#define HasCookieMaker	NO
#endif

alanh's avatar
alanh committed
287
288
289
290
291
292
293
294
295
296
297
298
299
#ifndef DoLoadableServer
#define DoLoadableServer NO
#endif
#ifndef MakeDllModules
#define MakeDllModules NO
#endif
#ifndef StripInstalledPrograms
#define StripInstalledPrograms NO	/* leave symbol table just in case */
#endif
#ifndef StaticNeedsPicForShared
#define StaticNeedsPicForShared NO
#endif

daryll's avatar
daryll committed
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
#include <Imake.rules>

#ifndef HasSharedLibraries
#define HasSharedLibraries NO
#endif
#ifndef OSMajorVersion
#define OSMajorVersion          0
#endif
#ifndef OSMinorVersion
#define OSMinorVersion          0
#endif
#ifndef OSTeenyVersion
#define OSTeenyVersion		0
#endif
#ifndef UnalignedReferencesAllowed
#define UnalignedReferencesAllowed NO	/* if arbitrary deref is okay */
#endif
#ifndef AvoidNullMakeCommand
#if !HasBsdMake
#define AvoidNullMakeCommand NO
#else
#define AvoidNullMakeCommand YES
#endif
#endif
#if AvoidNullMakeCommand
#ifndef NullMakeCommand
#define NullMakeCommand		@ echo -n
#endif
/*
 * An obscure bug in BSD4.3's original make causes it not to recognize a
 * macro definition if the macro name starts with a non-alpha and in
 * column one.
 */
 _NULLCMD_ = NullMakeCommand
#endif

#ifndef CrossCompiling
#define CrossCompiling		NO
alanh's avatar
alanh committed
338
#undef  CrossCompileDir
daryll's avatar
daryll committed
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
#endif
#ifndef BourneShell			/* to force shell in makefile */
#define BourneShell		/bin/sh
#endif
#ifndef ConstructMFLAGS
#if SystemV
#define ConstructMFLAGS		YES	/* build MFLAGS from MAKEFLAGS */
#else
#define ConstructMFLAGS		NO	/* build MFLAGS from MAKEFLAGS */
#endif
#endif

#ifndef ConstructMAKEFLAGS		/* needed on old BSD-based? */
#define ConstructMAKEFLAGS	NO	/* build MAKEFLAGS from MFLAGS */
#endif

#ifndef HasLargeTmp
#define HasLargeTmp		NO	/* be paranoid */
#endif

alanh's avatar
alanh committed
359
360
361
362
363
364
365
#ifndef HasMotif
#define HasMotif		NO
#endif
#ifndef HasBSDAuth
#define HasBSDAuth		NO
#endif

daryll's avatar
daryll committed
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
#ifndef HasBSD44Sockets
#define HasBSD44Sockets		NO
#endif
#ifndef HasSockets
#define HasSockets		YES
#endif
#ifndef HasStreams
#define HasStreams		!HasSockets
#endif
#ifndef HasDECnet
#define HasDECnet		NO
#endif
#ifndef HasPoll
#if SystemV || SystemV4
#define HasPoll			YES
#else
#define HasPoll			NO
#endif
#endif
#ifndef HasVFork
#if SystemV
#define HasVFork		NO	/* not yet... */
#else
#define HasVFork		YES
#endif
#endif
dawes's avatar
dawes committed
392
393
394
#ifndef HasSetProcTitle
#define HasSetProcTitle		NO
#endif
daryll's avatar
daryll committed
395
396
397
398
399
400
401
402
403
#ifndef HasSetUserContext
#define HasSetUserContext	NO
#endif
#ifndef HasLibCrypt
#define HasLibCrypt		NO
#endif
#ifndef HasPutenv
#define HasPutenv		NO	/* assume not */
#endif
alanh's avatar
alanh committed
404
405
406
407
/* setenv(3) and unsetenv(3) */
#ifndef HasSetenv
#define HasSetenv		YES	/* assume yes */
#endif
daryll's avatar
daryll committed
408
409
410
411
412
413
414
415
416
417
418
419
#ifndef HasVoidSignalReturn
#define HasVoidSignalReturn	YES	/* assume yes */
#endif
#ifndef HasBsearch
#define HasBsearch		YES	/* assume yes */
#endif
#ifndef HasSnprintf
#define HasSnprintf		NO	/* assume not */
#endif
#ifndef HasDlopen
#define HasDlopen		NO	/* assume not */
#endif
alanh's avatar
alanh committed
420
421
422
423
424
425
#ifndef HasIssetugid
#define HasIssetugid		NO	/* assume not */
#endif
#ifndef HasGetresuid
#define HasGetresuid		NO	/* assume not */
#endif
daryll's avatar
daryll committed
426
427
428
429
430
431
#ifndef HasMkstemp
#define HasMkstemp		NO	/* assume not */
#endif
#ifndef HasUsableFileMmap
#define HasUsableFileMmap	NO	/* assume not */
#endif
alanh's avatar
alanh committed
432
433
434
#ifndef HasGetIfAddrs
#define HasGetIfAddrs		NO	/* assume not */
#endif
daryll's avatar
daryll committed
435
436
437
438
439
440
#ifndef HasStickyDirBit
#define HasStickyDirBit		YES
#endif
#ifndef HasFchown
#define HasFchown		YES
#endif
dawes's avatar
dawes committed
441
442
443
444
445
446
#ifndef HasPam
#define HasPam			NO
#endif
#ifndef HasPamMisc
#define HasPamMisc		NO
#endif
alanh's avatar
alanh committed
447
448
449
#ifndef HasGetpeereid
#define HasGetpeereid		NO
#endif
alanh's avatar
alanh committed
450
451
452
#ifndef NoStrstr
#define NoStrstr		NO
#endif
daryll's avatar
daryll committed
453
454
455
456
/* byte-order defaults */
#ifndef ByteOrder
#if defined(VaxArchitecture)
#define ByteOrder		X_LITTLE_ENDIAN
dawes's avatar
dawes committed
457
#elif defined(MipsArchitecture) && defined(MipselArchitecture)
daryll's avatar
daryll committed
458
459
460
461
462
#define ByteOrder		X_LITTLE_ENDIAN
#elif defined(MipsArchitecture)
#define ByteOrder		X_BIG_ENDIAN
#elif defined(i386Architecture)
#define ByteOrder		X_LITTLE_ENDIAN
jhartmann's avatar
jhartmann committed
463
464
#elif defined(ia64Architecture)
#define ByteOrder		X_LITTLE_ENDIAN
alanh's avatar
alanh committed
465
466
#elif defined(x86_64Architecture)
#define ByteOrder		X_LITTLE_ENDIAN
dawes's avatar
dawes committed
467
#elif defined(SparcArchitecture) || defined(Sparc64Architecture)
daryll's avatar
daryll committed
468
469
470
471
472
473
474
475
476
#define ByteOrder		X_BIG_ENDIAN
#elif defined(AlphaArchitecture)
#define ByteOrder		X_LITTLE_ENDIAN
#elif defined(Mc68000Architecture)
#define ByteOrder		X_BIG_ENDIAN
#elif defined(Mc68020Architecture)
#define ByteOrder		X_BIG_ENDIAN
#elif defined(Mc88000Architecture)
#define ByteOrder		X_BIG_ENDIAN
dawes's avatar
dawes committed
477
478
479
480
#elif defined(s390Architecture)
#define ByteOrder		X_BIG_ENDIAN
#elif defined(s390xArchitecture)
#define ByteOrder		X_BIG_ENDIAN
daryll's avatar
daryll committed
481
482
483
484
#elif defined(Arm32Architecture)
#define ByteOrder		X_LITTLE_ENDIAN
#elif defined(PpcArchitecture)
#define ByteOrder		X_BIG_ENDIAN
dawes's avatar
dawes committed
485
486
#elif defined(HPArchitecture)
#define ByteOrder		X_BIG_ENDIAN
dawes's avatar
dawes committed
487
488
489
490
#elif defined(SuperHArchitecture)
#define ByteOrder		X_LITTLE_ENDIAN
#elif defined(SuperHebArchitecture)
#define ByteOrder		X_BIG_ENDIAN
daryll's avatar
daryll committed
491
492
493
494
495
#endif
#endif /* ByteOrder */
#ifndef HasFortran
#define HasFortran		NO
#endif
alanh's avatar
alanh committed
496
497
498
#ifndef HasGcc2ForCplusplus
#define HasGcc2ForCplusplus	NO
#endif
daryll's avatar
daryll committed
499
500
501
502
503
504
505
#ifndef HasCplusplus
#if HasGcc2ForCplusplus
#define HasCplusplus		YES
#else
#define HasCplusplus		NO
#endif
#endif
dawes's avatar
dawes committed
506
507
508
#ifndef HasMktemp
#define HasMktemp		NO	/* if you have the mktemp command */
#endif
daryll's avatar
daryll committed
509
510
511
512
513
514
#ifndef HasNdbm
#define HasNdbm			NO
#endif
#ifndef HasSecureRPC
#define HasSecureRPC		NO	/* if you have Secure RPC */
#endif
alanh's avatar
alanh committed
515
516
517
#ifndef HasKrbIV
#define HasKrbIV		NO	/* if you have Kerberos IV */
#endif
daryll's avatar
daryll committed
518
519
520
521
#ifndef HasKrb5
#define HasKrb5			NO      /* if you have Kerberos V5 */
#endif
#ifndef HasLatex
jhartmann's avatar
jhartmann committed
522
#define HasLatex		NO
daryll's avatar
daryll committed
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
#endif
#ifndef HasShm
#if SystemV || SystemV4
#define HasShm			YES
#else
#define HasShm			NO
#endif
#endif
#ifndef HasCbrt
#define HasCbrt			YES
#endif
#ifndef HasFfs
#define HasFfs			YES
#endif
#ifndef HasZlib
#define HasZlib			NO
#endif
dawes's avatar
dawes committed
540
541
542
#ifndef OsNeedZlibHeaders
#define OsNeedZlibHeaders	!HasZlib
#endif
daryll's avatar
daryll committed
543
544
545
546
547
548
#if !HasZlib		/* if OS doesn't have it, we'll build it */
#undef GzipLibrary	/* GzipLibrary was valid only if HasZlib */
#endif
#ifndef GzipLibrary	/* if OS config didn't define it, assume it's -lz */
#define GzipLibrary -lz
#endif
dawes's avatar
dawes committed
549
550
551
552
/* If the system has the Freetype2 library */
#ifndef HasFreetype2
#define HasFreetype2		NO
#endif
alanh's avatar
alanh committed
553
554
555
556
557
558
559
/* If the system has the Fontconfig library */
#ifndef HasFontconfig
#define HasFontconfig		NO
#endif
#ifndef HasLibpng
#define HasLibpng		NO
#endif
alanh's avatar
alanh committed
560
561
562
563
564
#if HasKrbIV
#ifndef KrbIVIncludes
#define KrbIVIncludes /**/
#endif
#ifndef KrbIVLibraries
alanh's avatar
alanh committed
565
#define KrbIVLibraries -lkrb -ldes
alanh's avatar
alanh committed
566
567
#endif
#endif
daryll's avatar
daryll committed
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
#if HasKrb5
#ifndef Krb5Includes
#define Krb5Includes -I/krb5/include
#endif
#ifndef Krb5Libraries
#define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
#endif
#else
#undef Krb5Includes
#define Krb5Includes /**/
#undef Krb5Libraries
#define Krb5Libraries /**/
#endif
#ifndef UseGnuMalloc
#define UseGnuMalloc		NO
#endif
#ifndef GnuMallocLibrary
#define GnuMallocLibrary -lgmalloc
#endif
#ifndef MallocLibraries
#if UseGnuMalloc
#define MallocLibraries	GnuMallocLibrary
#else
#define MallocLibraries	/**/
#endif
#endif
#ifndef HasPosixRegex		/* Most modern platforms have it */
#define HasPosixRegex		YES
#endif
#ifndef RegexLibrary
#if HasPosixRegex
#define RegexLibrary		/**/
#else
#define RegexLibrary		-lregex
#endif
#endif
#ifndef HasNCurses
#define HasNCurses		NO
#endif
#ifndef NCursesLibName
#if HasNCurses
#define NCursesLibName	-lncurses
#else
#define NCursesLibName
#endif
#endif
#ifdef NCursesLibDir
NCURSESLIBDIR = NCursesLibDir
#endif
#ifdef NCursesIncDir
NCURSESINCDIR = NCursesIncDir
#endif
jhartmann's avatar
jhartmann committed
620
621
622
623
624
625
626
627
628
629
630
631
632
#ifndef HasGlide2
#define HasGlide2 NO
#endif
#ifndef Glide2IncDir
#if HasGlide2
#define Glide2IncDir /usr/include/glide
#else
#define Glide2IncDir
#endif
#endif
GLIDE2INCDIR = Glide2IncDir
#ifndef HasGlide3
#define HasGlide3 NO
daryll's avatar
daryll committed
633
#endif
jhartmann's avatar
jhartmann committed
634
635
636
#ifndef Glide3IncDir
#if HasGlide3
#define Glide3IncDir /usr/include/glide3
daryll's avatar
daryll committed
637
#else
jhartmann's avatar
jhartmann committed
638
#define Glide3IncDir
daryll's avatar
daryll committed
639
640
#endif
#endif
jhartmann's avatar
jhartmann committed
641
GLIDE3INCDIR = Glide3IncDir
alanh's avatar
alanh committed
642
643
644
645
646
647
648
649
#ifndef Glide3LibName
#if HasGlide3
#define Glide3LibName glide3
#else
#define Glide3LibName
#endif
#endif
GLIDE3LIBNAME = Glide3LibName
daryll's avatar
daryll committed
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
#ifndef HasTk
#define HasTk NO
#endif
#ifndef TkLibName
#if HasTk
#define TkLibName tk
#else
#define TkLibName
#endif
#endif
TKLIBNAME = TkLibName
#ifndef TkLibDir
#if HasTk
#define TkLibDir /usr/local/lib
#else
#define TkLibDir
#endif
#endif
TKLIBDIR = TkLibDir
#ifndef TkIncDir
#if HasTk
#define TkIncDir /usr/local/include
#else
#define TkIncDir
#endif
#endif
#ifndef TkLibrary
#ifdef HasTk
#define TkLibrary Concat(-L,$(TKLIBDIR)) Concat(-l,$(TKLIBNAME))
#else
#define TkLibrary
#endif
#endif
#ifndef HasTcl
#define HasTcl NO
#endif
#ifndef TclLibName
#if HasTcl
#define TclLibName tcl
#else
#define TclLibName
#endif
#endif
TCLLIBNAME = TclLibName
#ifndef TclLibDir
#if HasTcl
#define TclLibDir /usr/local/lib
#else
#define TclLibDir
#endif
#endif
TCLIBDIR = TclLibDir
#ifndef TclIncDir
#if HasTcl
#define TclIncDir /usr/local/include
#else
#define TclIncDir
#endif
#endif
#ifndef TclLibrary
#ifdef HasTcl
#define TclLibrary Concat(-L,$(TCLLIBDIR)) Concat(-l,$(TCLLIBNAME))
#else
#define TclLibrary
#endif
#endif
alanh's avatar
alanh committed
716
717
718
#ifndef HasTsLib
#define HasTsLib NO
#endif
dawes's avatar
dawes committed
719
720
721
722
723
724
725
726
727
728
729
/*
 * Libtool has two different behaviours for version numbers.
 * On platforms which support a minor number, the library
 * version is (version - minor).minor, on those that don't,
 * the version if version.0.  Linux and Darwin support minor
 * numbers; some BSDs do as well.  Set this to YES if libtool
 * uses minor numbers on your platform.
 */
#ifndef LibtoolMinorVersions
#define LibtoolMinorVersions	NO
#endif
daryll's avatar
daryll committed
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
#ifndef NeedConstPrototypes
#define NeedConstPrototypes	NO
#endif
#ifndef NeedVarargsPrototypes
#define NeedVarargsPrototypes	NO
#endif
#ifndef NeedNestedPrototypes
#define NeedNestedPrototypes	NO
#endif
#ifndef NeedFunctionPrototypes
#define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
#endif
#ifndef NeedWidePrototypes
#define NeedWidePrototypes	YES	/* mix and match ANSI-C, non-ANSI */
#endif

#ifndef UseCCMakeDepend			/* use slow cc -E script */
#define UseCCMakeDepend NO
#endif
#ifndef UseGccMakeDepend		/* use slowish but correct gcc -M */
#define UseGccMakeDepend NO
#endif

dawes's avatar
dawes committed
753
754
755
756
#ifndef CaseSensitiveFileSystem
#define CaseSensitiveFileSystem YES
#endif

daryll's avatar
daryll committed
757
758
759
760
761
762
763
/* DefaultUsrBin is independent of ProjectRoot.
   This is a directory where programs will be found even if PATH
   is not set, for example when coming in remotely via rsh. */
#ifndef DefaultUsrBin
#define	DefaultUsrBin /usr/bin
#endif

alanh's avatar
alanh committed
764
765
766
767
#ifndef LibDirName
# define LibDirName lib
#endif

daryll's avatar
daryll committed
768
769
#ifndef UsrLibDir
#ifdef ProjectRoot
alanh's avatar
alanh committed
770
#define UsrLibDir Concat3(ProjectRoot,/,LibDirName)
daryll's avatar
daryll committed
771
772
773
774
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir YES
#endif
#else
alanh's avatar
alanh committed
775
#define UsrLibDir Concat3(/usr,/,LibDirName)
daryll's avatar
daryll committed
776
777
778
779
780
781
782
783
784
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir NO
#endif
#endif
#else
#ifndef AlternateUsrLibDir
#define AlternateUsrLibDir YES
#endif
#endif
dawes's avatar
dawes committed
785
#ifndef VarDirectory
daryll's avatar
daryll committed
786
#ifdef ProjectVar
dawes's avatar
dawes committed
787
#define VarDirectory ProjectVar
daryll's avatar
daryll committed
788
#else
dawes's avatar
dawes committed
789
790
#define VarDirectory /var
#endif
daryll's avatar
daryll committed
791
#endif
dawes's avatar
dawes committed
792
793
#ifndef VarLibDir
#define VarLibDir $(VARDIR)/lib
daryll's avatar
daryll committed
794
795
#endif

alanh's avatar
alanh committed
796
797
798
799
800
801
/*
 * SystemUsrLibDir is independent of ProjectRoot.  It is used primarily
 * to allow links for shared libraries in /usr/lib for compliance to
 * various standards (e.g., Linux/OpenGL).
 */
#ifndef SystemUsrLibDir
alanh's avatar
alanh committed
802
#define SystemUsrLibDir /usr/LibDirName
alanh's avatar
alanh committed
803
804
805
806
807
#endif
#ifndef SystemUsrIncDir
#define SystemUsrIncDir /usr/include
#endif

daryll's avatar
daryll committed
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
#ifndef ShLibDir
#define ShLibDir UsrLibDir
#endif
#ifndef IncRoot
#ifdef ProjectRoot
#define IncRoot Concat(ProjectRoot,/include)
#ifndef AlternateIncRoot
#define AlternateIncRoot YES
#endif
#else
#define IncRoot /usr/include
#ifndef AlternateIncRoot
#define AlternateIncRoot NO
#endif
#endif
#else
#ifndef AlternateIncRoot
#define AlternateIncRoot YES
#endif
#endif
#ifndef LintlibDir
#define LintlibDir $(USRLIBDIR)/lint
#endif
#ifndef SystemManDirectory
#if SystemV4
#define SystemManDirectory /usr/share/man
#else
#define SystemManDirectory /usr/man
#endif
#endif
#ifndef ManDirectoryRoot
#ifdef ProjectRoot
#define ManDirectoryRoot Concat(ProjectRoot,/man)
#else
#define ManDirectoryRoot SystemManDirectory
#endif
#endif
#ifndef ManPath
#define ManPath ManDirectoryRoot
#endif
#ifndef ManSourcePath
#define ManSourcePath $(MANPATH)/man
#endif
#ifndef ManDir
#define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
#endif
#ifndef LibmanDir
#define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
#endif
#ifndef FileManDir
#define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
#endif
#ifndef MiscManDir
#define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
#endif
#ifndef DriverManDir
#define DriverManDir $(MANSOURCEPATH)$(DRIVERMANSUFFIX)
#endif
dawes's avatar
dawes committed
866
867
868
#ifndef AppLoadDefs
#define AppLoadDefs -D__apploaddir__=$(XAPPLOADDIR)
#endif
alanh's avatar
alanh committed
869
870
871
#ifndef LibManDefs
#define LibManDefs -D__libmansuffix__=$(LIBMANSUFFIX)
#endif
daryll's avatar
daryll committed
872
873
874
875
876
877
878
879
880
#ifndef FileManDefs
#define FileManDefs -D__filemansuffix__=$(FILEMANSUFFIX)
#endif
#ifndef MiscManDefs
#define MiscManDefs -D__miscmansuffix__=$(MISCMANSUFFIX)
#endif
#ifndef DriverManDefs
#define DriverManDefs -D__drivermansuffix__=$(DRIVERMANSUFFIX)
#endif
dawes's avatar
dawes committed
881
882
883
884
885
886
#ifndef ProjectManDefs
#define ProjectManDefs -D__projectroot__=$(PROJECTROOT)
#endif

#ifndef CompressManCmd
#define CompressManCmd gzip -n
daryll's avatar
daryll committed
887
888
#endif

alanh's avatar
alanh committed
889
890
891
892
893
894
#ifndef HtmlIndexCmd
#if BuildHtmlManPages
#define HtmlIndexCmd $(MKHTMLINDEX)
#endif
#endif

daryll's avatar
daryll committed
895
896
#ifndef LogDirectory
#if HasVarDirectory
dawes's avatar
dawes committed
897
#define LogDirectory $(VARDIR)/log
daryll's avatar
daryll committed
898
899
900
901
902
#else
#define LogDirectory /usr/adm
#endif
#endif

kem's avatar
kem committed
903
904
905
906
907
908
#ifndef HasVarRun
#define HasVarRun NO
#endif

#ifndef VarRunDirectory
#if HasVarRun
dawes's avatar
dawes committed
909
#define VarRunDirectory $(VARDIR)/run
kem's avatar
kem committed
910
911
912
913
914
915
916
917
918
#endif
#endif

#ifndef HasVarDb
#define HasVarDb NO
#endif

#ifndef VarDbDirectory
#if HasVarDb
dawes's avatar
dawes committed
919
#define VarDbDirectory $(VARDIR)/db
kem's avatar
kem committed
920
921
922
#endif
#endif

daryll's avatar
daryll committed
923
924
925
926
927
928
929
930
931
932
933
#ifndef ConfigSrc
#define ConfigSrc $(TOP)/config
#endif
#ifndef DependDir
#if UseCCMakeDepend || UseGccMakeDepend
#define DependDir $(CONFIGSRC)/util
#else
#define DependDir $(CONFIGSRC)/makedepend
#endif
#endif
#ifndef UNCOMPRESSPATH
dawes's avatar
dawes committed
934
#define UNCOMPRESSPATH /usr/ucb/uncompress /* obsolete */
daryll's avatar
daryll committed
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
#endif
#ifndef OptimizedCDebugFlags
#define OptimizedCDebugFlags -O
#endif
#ifndef OptimizedCplusplusDebugFlags
#define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
#endif
#ifndef DebuggableCDebugFlags
#define DebuggableCDebugFlags -g
#endif
#ifndef DebuggableCplusplusDebugFlags
#define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
#endif
#ifndef ProfiledCDebugFlags
#define ProfiledCDebugFlags -pg
#endif
#ifndef ProfiledCplusplusDebugFlags
#define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
#endif
#ifndef NoOpCDebugFlags
#define NoOpCDebugFlags /**/
#endif
#ifndef DefaultCDebugFlags
#define DefaultCDebugFlags OptimizedCDebugFlags
#endif
#ifndef DefaultCplusplusDebugFlags
#define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
#endif
#ifndef DefaultCCOptions
#define DefaultCCOptions /* floating point, etc. */
#endif
#ifndef DefaultCplusplusOptions
#define DefaultCplusplusOptions /* floating point, etc. */
#endif
#ifndef NoRConst
#define NoRConst NO /* YES if const for structs of funcs is bad */
#endif
#ifndef InstPgmFlags
#define InstPgmFlags -s
#endif
#ifndef InstBinFlags
#define InstBinFlags -m 0755
#endif
#ifndef InstUidFlags
#define InstUidFlags -m 4711
#endif
#ifndef InstLibFlags
#define InstLibFlags -m 0644
#endif
#ifndef InstIncFlags
#define InstIncFlags -m 0444
#endif
#ifndef InstManFlags
#define InstManFlags -m 0444
#endif
#ifndef InstDatFlags
#define InstDatFlags -m 0444
#endif
#ifndef InstKmemFlags     /* put -g kmem -m 2711 in site.def... */
#define InstKmemFlags InstUidFlags
#endif
#ifndef ParallelMakeFlags
#define ParallelMakeFlags /**/
#endif
#ifndef ArCmdBase
#define ArCmdBase ar
#endif
#ifndef ArCmd
#if HasLargeTmp || SystemV4
#define ArCmd ArCmdBase cq
#else
#define ArCmd ArCmdBase clq
#endif
#endif
#ifndef ArAddCmd
#if HasLargeTmp || SystemV4
#define ArAddCmd ArCmdBase ru
#else
#define ArAddCmd ArCmdBase rul
#endif
#endif
#ifndef ArExtCmd
#if HasLargeTmp || SystemV4
#define ArExtCmd ArCmdBase x
#else
#define ArExtCmd ArCmdBase xl
#endif
#endif
#ifndef BootstrapCFlags
#define BootstrapCFlags /**/
#endif
alanh's avatar
alanh committed
1026
1027
1028
#ifndef HasGcc3
#define HasGcc3 NO
#endif
daryll's avatar
daryll committed
1029
#ifndef HasGcc2
alanh's avatar
alanh committed
1030
#define HasGcc2 HasGcc3
daryll's avatar
daryll committed
1031
1032
1033
1034
#endif
#ifndef HasGcc
#define HasGcc HasGcc2
#endif
dawes's avatar
dawes committed
1035
1036
1037
#ifndef HasBrokenCCForLink
#define HasBrokenCCForLink NO
#endif
daryll's avatar
daryll committed
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
#ifndef CcCmd
#if HasGcc2
#define CcCmd gcc -fpcc-struct-return 
#else
#if HasGcc
#define CcCmd gcc -fstrength-reduce -fpcc-struct-return 
#else
#if HasCenterLineC
#define CcCmd clcc
#else
#define CcCmd cc
#endif
#endif
#endif
#endif
#ifndef CplusplusCmd
#if HasGcc2ForCplusplus
#define CplusplusCmd g++
#else
#define CplusplusCmd CC
#endif
#endif
#ifndef CplusplusFilt
# define CplusplusFilt	c++filt
#endif
#ifndef CplusplusLibC
#define CplusplusLibC /**/
#endif
#ifndef CplusplusStandardDefines
#define CplusplusStandardDefines StandardDefines
#endif
#ifndef CplusplusExtraDefines
#define CplusplusExtraDefines /**/
#endif
#ifndef CplusplusExtraIncludes
#define CplusplusExtraIncludes /**/
#endif
#ifndef CplusplusDependIncludes
#define CplusplusDependIncludes /**/
#endif
#ifndef CplusplusOptions
#define CplusplusOptions /**/
#endif
#ifndef CplusplusSpecialOptions
#define CplusplusSpecialOptions /**/
#endif
#if HasFortran
#ifndef FortranCmd
#define FortranCmd f77
#endif
#ifndef FortranFlags
#define FortranFlags /**/
#endif
#ifndef FortranDebugFlags	/* for -O or -g */
#define FortranDebugFlags /**/
#endif
#endif
#ifndef AsCmd
#define AsCmd as
#endif
dawes's avatar
dawes committed
1098
1099
1100
#ifndef AsmDefines
#define AsmDefines /**/
#endif
daryll's avatar
daryll committed
1101
1102
1103
1104
1105
1106
1107
#ifndef CompressCmd
#define CompressCmd compress
#endif
#ifndef GzipCmd
#define GzipCmd gzip
#endif
#ifndef CppCmd
alanh's avatar
alanh committed
1108
#define CppCmd /LibDirName/cpp
daryll's avatar
daryll committed
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
#endif
#ifndef RawCppCmd
#define RawCppCmd CppCmd -undef
#endif
#ifndef CppNoLineInfoOption
#define CppNoLineInfoOption /**/
#endif
#ifndef PreProcessCmd
#define PreProcessCmd CcCmd -E
#endif
#ifndef InstallCmd		/* hack should be in project */
#if SystemV || SystemV4
#ifdef UseInstalled		/* assume BINDIR in path */
#define InstallCmd bsdinst
#else
#define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
#endif
#else
#define InstallCmd install
#endif
#endif
#ifndef InstallFlags
#define InstallFlags -c
#endif
#ifndef LdCmd
#define LdCmd ld
#endif
alanh's avatar
alanh committed
1136
1137
1138
1139
1140
1141
#ifndef M4Cmd
#define M4Cmd m4
#endif
#ifndef M4Flags
#define M4Flags /**/
#endif
daryll's avatar
daryll committed
1142
1143
1144
1145
1146
1147
#ifndef LexCmd
#define LexCmd lex
#endif
#ifndef LexLib
#define LexLib -ll
#endif
dawes's avatar
dawes committed
1148
1149
1150
#ifndef HasFlex
#define HasFlex NO
#endif
daryll's avatar
daryll committed
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
#ifndef YaccCmd
#define YaccCmd yacc
#endif
#ifndef CplusplusYaccCmd
#define CplusplusYaccCmd YaccCmd
#endif
#ifndef LintCmd
#define LintCmd lint
#endif
#ifndef LintLibFlag
#if SystemV || SystemV4
#define LintLibFlag -o
#else
#define LintLibFlag -C
#endif
#endif
#ifndef LintOpts
#if SystemV || SystemV4
#define LintOpts -bh
#else
#define LintOpts -axz
#endif
#endif
#ifndef CpCmd
#define CpCmd cp
#endif
#ifndef LnCmd /* can use cp instead of ln if necessary */
#if HasSymLinks
#define LnCmd ln -s
#else
#define LnCmd ln
#endif
#endif
#ifndef MakeCmd
#define MakeCmd make
#endif
#ifndef MvCmd
#define MvCmd mv -f
#endif
#ifndef RanlibCmd
#define RanlibCmd ranlib
#endif
#ifndef RanlibInstFlags
#define RanlibInstFlags /**/
#endif
#ifndef RmCmd
#define RmCmd rm -f
#endif

dawes's avatar
dawes committed
1200
1201
1202
1203
/*
 * Module cross-compile stuff.  By default they are defined to be exactly the
 * same as the non-module versions.
 */
daryll's avatar
daryll committed
1204
1205
1206
1207
1208
1209
1210
#ifndef ModuleCcCmd
#define ModuleCcCmd CcCmd
#endif
#ifndef ModuleCppCmd
#define ModuleCppCmd CppCmd
#endif
#ifndef ModuleCFlags
dawes's avatar
dawes committed
1211
#define ModuleCFlags $(CFLAGS)
daryll's avatar
daryll committed
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
#endif
#ifndef ModuleAsCmd
#define ModuleAsCmd AsCmd
#endif
#ifndef ModuleAsFlags
#define ModuleAsFlags /**/
#endif
#ifndef ModuleLdCmd
#define ModuleLdCmd LdCmd
#endif
#ifndef ModuleLdFlags
#define ModuleLdFlags /**/
#endif
#ifndef ModuleLdCombineFlags
#define ModuleLdCombineFlags LdCombineFlags
#endif
#ifndef ModuleArCmd
#define ModuleArCmd ArCmd
#endif
#ifndef NeedModuleRanlib
#define NeedModuleRanlib NO
#endif
#ifndef ModuleRanlibCmd
dawes's avatar
dawes committed
1235
#define ModuleRanlibCmd RanlibCmd
daryll's avatar
daryll committed
1236
1237
#endif

alanh's avatar
alanh committed
1238
1239
1240
#ifndef HostCcCmd
#define HostCcCmd cc
#endif
daryll's avatar
daryll committed
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
#ifndef StandardIncludes	/* for platform-specifics */
#define StandardIncludes /**/
#endif
#ifndef StandardDefines
#if SystemV
#define StandardDefines -DSYSV
#else
#if SystemV4
#define StandardDefines -DSVR4
#else
#define StandardDefines /**/
#endif
#endif
#endif
#ifndef StandardCppOptions
#define StandardCppOptions /**/
#endif
#ifndef StandardCppDefines
#define StandardCppDefines StandardCppOptions StandardDefines
#endif
#ifndef Malloc0ReturnsNull
#if UseGnuMalloc
#define Malloc0ReturnsNull YES
#else
#define Malloc0ReturnsNull NO
#endif
#endif
#if Malloc0ReturnsNull
#ifndef Malloc0ReturnsNullDefines
#define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
#endif
#endif
#ifndef ToolkitStringsABIOptions
#define ToolkitStringsABIOptions /**/
#endif
#ifndef NdbmDefines
#if HasNdbm
#define NdbmDefines -DNDBM
#else
#define NdbmDefines /**/
#endif
#endif
alanh's avatar
alanh committed
1283
1284
1285
#ifndef HasLdRunPath
#define HasLdRunPath NO
#endif
daryll's avatar
daryll committed
1286
#ifndef LdPreLib
alanh's avatar
alanh committed
1287
# if !defined(UseInstalled)
alanh's avatar
alanh committed
1288
#  define LdPreLib -L$(BUILDLIBDIR)
alanh's avatar
alanh committed
1289
1290
1291
1292
1293
1294
# else
# if AlternateUsrLibDir
#  define LdPreLib -L$(USRLIBDIR)
# else
# define LdPreLib /**/
# endif
daryll's avatar
daryll committed
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
#endif
#endif
#ifndef LdPostLib
#if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
#define LdPostLib -L$(USRLIBDIR)
#else
#define LdPostLib /**/
#endif
#endif
#ifndef MathLibrary
#define MathLibrary -lm
#endif
#ifndef DBMLibrary
#define DBMLibrary -ldbm
#endif
#ifndef DlLibrary
#define DlLibrary -ldl
#endif
#ifndef ExtraLibraries
#if SystemV4
#if HasSockets
#define ExtraLibraries -lsocket -lnsl -lw
#else
#define ExtraLibraries -lnsl -lw
#endif
#else
#define ExtraLibraries /**/
#endif
#endif
#ifndef ExtraLoadOptions
#define ExtraLoadOptions /**/
#endif
#ifndef ExtraLoadFlags
#define ExtraLoadFlags /**/
#endif
#ifndef LdCombineFlags
#if SystemV4
#define LdCombineFlags -r
#else
#define LdCombineFlags -X -r
#endif
#endif
#ifndef LdStripFlags
#define LdStripFlags -x
#endif
#ifndef TagsCmd
#define TagsCmd ctags
#endif
#ifndef LoaderLibPrefix
#define LoaderLibPrefix /**/
#endif
#ifndef ImakeCmd
#ifdef UseInstalled		/* assume BINDIR in path */
#define ImakeCmd imake
#else
#define ImakeCmd $(IMAKESRC)/imake
#endif
#endif
alanh's avatar
alanh committed
1353
1354
1355
#ifndef ImakeWarningFlags
#define ImakeWarningFlags	/* Nothing */
#endif
daryll's avatar
daryll committed
1356
1357
1358
1359
1360
1361
1362
#ifndef DependCmd
#if UseGccMakeDepend
#ifdef UseInstalled		/* assume BINDIR in path */
#define DependCmd gccmakedep
#else
#define DependCmd $(DEPENDSRC)/gccmakedep
#endif
dawes's avatar
dawes committed
1363
1364
1365
1366
1367
1368
#elif UseCCMakeDepend
#ifdef UseInstalled		/* assume BINDIR in path */
#define DependCmd ccmakedep
#else
#define DependCmd $(DEPENDSRC)/ccmakedep
#endif
daryll's avatar
daryll committed
1369
1370
1371
1372
1373
1374
1375
1376
#else
#ifdef UseInstalled		/* assume BINDIR in path */
#define DependCmd makedepend
#else
#define DependCmd $(DEPENDSRC)/makedepend
#endif
#endif
#endif
dawes's avatar
dawes committed
1377
#ifndef DependDefines
alanh's avatar
alanh committed
1378
# if UseCCMakeDepend || UseGccMakeDepend
dawes's avatar
dawes committed
1379
1380
1381
1382
1383
#  define DependDefines /**/
# else
#  define DependDefines -DUSE_MAKEDEPEND
# endif
#endif
daryll's avatar
daryll committed
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
#ifndef DependFlags
#define DependFlags /**/
#endif
#ifndef DependFileName
#if !HasBsdMake
#define DependFileName Makefile.dep
#else
#define DependFileName .depend
#endif
#endif
#ifndef ExportListCmd
# ifndef ExportListGenSource
#  define ExportListCmd		/**/
# elif !defined(UseInstalled)
#  define ExportListCmd		$(CONFIGSRC)/util/exportlistgen
# else
#  define ExportListCmd		exportlistgen
# endif
#endif
#ifndef MkdirHierCmd
#ifdef UseInstalled		/* assume BINDIR in path */
#define MkdirHierCmd mkdirhier
#else
#define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
#endif
#endif
#ifndef RevPathCmd
#ifdef UseInstalled		/* assume BINDIR in path */
#define RevPathCmd revpath
#else
#define RevPathCmd $(CONFIGSRC)/util/revpath
#endif
#endif
#ifndef TroffCmd
dawes's avatar
dawes committed
1418
#if HasGroff
daryll's avatar
daryll committed
1419
#define TroffCmd groff -Tps
dawes's avatar
dawes committed
1420
1421
1422
#else
#define TroffCmd troff -Tps
#endif
daryll's avatar
daryll committed
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
#endif
#ifndef NroffCmd
#define NroffCmd nroff
#endif
#ifndef MsMacros
#define MsMacros -ms
#endif
#ifndef ManMacros
#define ManMacros -man
#endif
#ifndef TblCmd
#define TblCmd tbl
#endif
#ifndef EqnCmd
#define EqnCmd eqn
#endif
#ifndef NeqnCmd
#define NeqnCmd neqn
#endif
#ifndef ColCmd
#define ColCmd col
#endif
#ifndef ColFlags
#define ColFlags -b
#endif
#ifndef DvipsCmd
#define DvipsCmd dvips
#endif
#ifndef LatexCmd
#define LatexCmd latex
#endif
#if HasSentinel
#ifndef SentinelCmd
#define SentinelCmd sentinel
#endif
#ifndef SentinelOptions
#define SentinelOptions /**/
#endif
#endif
#if HasPurify
#ifndef PurifyCmd
#define PurifyCmd purify
#endif
#ifndef PurifyOptions
#define PurifyOptions /**/
#endif
#endif
#if HasTestCenter
#ifndef ProofCmd
#define ProofCmd proof
#endif
#ifndef ProofOptions
#define ProofOptions /**/
#endif
#endif
#ifndef PathSeparator
#define PathSeparator /
#endif
#ifndef Osuf
#define Osuf o
#endif
#ifndef CCsuf
#define CCsuf cc
#endif
#ifndef SHsuf
#define SHsuf sh
#endif
#ifndef ManSuffix
#define ManSuffix	n		/* use just one tab or cpp will die */
#endif
#ifndef LibManSuffix
#define LibManSuffix	3		/* use just one tab or cpp will die */
#endif
#ifndef FileManSuffix
#if SystemV || SystemV4 || defined(OSF1Architecture)
#define FileManSuffix	4		/* use just one tab or cpp will die */
#else
#define FileManSuffix	5		/* use just one tab or cpp will die */
#endif
#endif
#ifndef MiscManSuffix
#if SystemV || SystemV4 || defined(OSF1Architecture)
#define MiscManSuffix	5		/* use just one tab or cpp will die */
#else
#define MiscManSuffix	7		/* use just one tab or cpp will die */
#endif
#endif
#ifndef DriverManSuffix
#if SystemV || SystemV4 || defined(OSF1Architecture)
#define DriverManSuffix	7		/* use just one tab or cpp will die */
#else
#define DriverManSuffix	4		/* use just one tab or cpp will die */
#endif
#endif
#ifndef ExpandManNames
#if SystemV
#define ExpandManNames NO
#else
#define ExpandManNames YES
#endif
#endif
dawes's avatar
dawes committed
1524
1525
1526
1527
1528
1529
#ifndef ManSrcSuffix
#define ManSrcSuffix	man
#endif
#ifndef ManNewSuffix
#define ManNewSuffix	_man
#endif
daryll's avatar
daryll committed
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
#ifndef TOPDIR
#define TOPDIR .
#endif
#ifndef CURDIR
#define CURDIR .
#endif
#ifndef SiteIConfigFiles
#define SiteIConfigFiles /**/
#endif
#ifndef OtherIConfigFiles
#define OtherIConfigFiles /**/
#endif
#ifndef ExtraFilesToClean
#define ExtraFilesToClean /**/
#endif
#ifndef FilesToClean
#define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut 
alanh's avatar
alanh committed
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
#endif

#ifdef CrossCompileDir
# ifndef StripPath
#  define StripPath(x) `echo x|sed "s%.*/%%"`
# endif
# ifndef CrossArCmd
#  define CrossArCmd Concat3(CrossCompileDir,/,StripPath(ArCmd))
# endif
# ifndef CrossCcCmd
#  define CrossCcCmd Concat3(CrossCompileDir,/,StripPath(CcCmd))
# endif
# ifndef CrossAsCmd
#  define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
# endif
# ifdef HasFortran
#  ifndef CrossFortranCmd
#   define CrossFortranCmd Concat3(CrossCompileDir,/,StripPath(FortranCmd))
#  endif
# endif
# ifndef CrossCplusplusCmd
#  define CrossCplusplusCmd Concat3(CrossCompileDir,/,StripPath(CplusplusCmd))
# endif
# ifndef CrossCppCmd
#  define CrossCppCmd Concat3(CrossCompileDir,/,StripPath(CppCmd))
# endif
# ifndef CrossRawCppCmdCmd
#  define CrossRawCppCmd Concat3(CrossCompileDir,/,StripPath(RawCppCmd))
# endif
# ifndef CrossPreProcessCmd
#  define CrossPreProcessCmd Concat3(CrossCompileDir,/,StripPath(PreProcessCmd))
# endif
# ifndef CrossAsCmd
#  define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
# endif
# ifndef CrossLdCmd
#  define CrossLdCmd Concat3(CrossCompileDir,/,StripPath(LdCmd))
# endif
# ifndef CrossModuleLdCmd
#  define CrossModuleLdCmd CrossLdCmd
# endif
# ifndef CrossLintCmd
#  define CrossLintCmd Concat3(CrossCompileDir,/,StripPath(LintCmd))
# endif
# ifndef CrossRanlibCmd
#  define CrossRanlibCmd Concat3(CrossCompileDir,/,StripPath(RanlibCmd))
# endif
# ifndef CrossModuleCcCmd
#  define CrossModuleCcCmd Concat3(CrossCompileDir,/,StripPath(ModuleCcCmd))
# endif
# ifndef CrossAsCmd
#  define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
# endif
daryll's avatar
daryll committed
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
#endif

          PATHSEP = PathSeparator
            SHELL = BourneShell

              TOP = TOPDIR
      CURRENT_DIR = CURDIR

            IMAKE = ImakeCmd
           DEPEND = DependCmd
        MKDIRHIER = MkdirHierCmd
          REVPATH = RevPathCmd
    EXPORTLISTGEN = ExportListCmd
alanh's avatar
alanh committed
1613
             RMAN = RmanCmd
alanh's avatar
alanh committed
1614
     RMANBASENAME = HostProgramTargetName(rman)
alanh's avatar
alanh committed
1615
      RMANOPTIONS = RmanOptions
daryll's avatar
daryll committed
1616
1617
1618
1619
1620
1621
        CONFIGSRC = ConfigSrc
         IMAKESRC = $(CONFIGSRC)/imake
        DEPENDSRC = DependDir

          INCROOT = IncRoot		/* base of where to put header files */
        USRLIBDIR = UsrLibDir		/* nonshared libraries */
dawes's avatar
dawes committed
1622
           VARDIR = VarDirectory	/* usually /var */
daryll's avatar
daryll committed
1623
        VARLIBDIR = VarLibDir		/* xdm runtime files */
alanh's avatar
alanh committed
1624
1625
  SYSTEMUSRLIBDIR = SystemUsrLibDir	/* system's "/usr/lib" */
  SYSTEMUSRINCDIR = SystemUsrIncDir	/* system's "/usr/include" */
daryll's avatar
daryll committed
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
         SHLIBDIR = ShLibDir            /* shared libraries */
       LINTLIBDIR = LintlibDir		/* lint libraries */
          MANPATH = ManPath		/* top of manual page tree */
    MANSOURCEPATH = ManSourcePath	/* prefix for man page sources */
           MANDIR = ManDir		/* man pages for commands */
        LIBMANDIR = LibmanDir		/* man pages for library routines */
       FILEMANDIR = FileManDir		/* man pages for config files */
       MISCMANDIR = MiscManDir		/* man pages for miscellaneous files */
     DRIVERMANDIR = DriverManDir	/* man pages for drivers */
     LOGDIRECTORY = LogDirectory	/* OS location of log files */
kem's avatar
kem committed
1636
1637
1638
1639
1640
1641
#ifdef VarRunDirectory
        VARRUNDIR = VarRunDirectory	/* OS location of PID files */
#endif
#ifdef VarDbDirectory
         VARDBDIR = VarDbDirectory	/* OS location of db/state files */
#endif
alanh's avatar
alanh committed
1642
1643
1644
#ifdef CrossCompileDir
               AR = CrossArCmd
#else
daryll's avatar
daryll committed
1645
               AR = ArCmd
alanh's avatar
alanh committed
1646
1647
1648
#endif
XCOMM Nice try but useless: make will inherit BOOTSTRAPCFLAGS 
XCOMM from  top Makefile
daryll's avatar
daryll committed
1649
  BOOTSTRAPCFLAGS = BootstrapCFlags	/* set if cpp does not have uniq sym */
alanh's avatar
alanh committed
1650
1651
1652
1653
#ifdef CrossCompileDir
               CC = CrossCcCmd
               AS = CrossAsCmd
#else
daryll's avatar
daryll committed
1654
1655
               CC = CcCmd
               AS = AsCmd
alanh's avatar
alanh committed
1656
#endif
daryll's avatar
daryll committed
1657
#if HasFortran
alanh's avatar
alanh committed
1658
1659
1660
# ifdef CrossCompileDir
               FC = CrossFortranCmd
# else
daryll's avatar
daryll committed
1661
               FC = FortranCmd
alanh's avatar
alanh committed
1662
# endif
daryll's avatar
daryll committed
1663
1664
1665
1666
1667
1668
1669
      FDEBUGFLAGS = FortranDebugFlags
          FCFLAGS = FortranFlags $(FDEBUGFLAGS)
#endif
#if HasCplusplus

.SUFFIXES: .CCsuf

alanh's avatar
alanh committed
1670
1671
1672
#ifdef CrossCompileDir
              CXX = CrossCplusplusCmd
#else
daryll's avatar
daryll committed
1673
              CXX = CplusplusCmd
alanh's avatar
alanh committed
1674
#endif
daryll's avatar
daryll committed
1675
1676
1677
1678
1679
1680
1681
1682
1683
          CXXFILT = CplusplusFilt
           CXXLIB = CplusplusLibC
    CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
CXXDEPENDINCLUDES = CplusplusDependIncludes
 CXXEXTRA_DEFINES = CplusplusExtraDefines
CXXEXTRA_INCLUDES = CplusplusExtraIncludes
   CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
       CXXOPTIONS = CplusplusOptions
      CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) 
dawes's avatar
dawes committed
1684
       CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES)
daryll's avatar
daryll committed
1685
1686
1687
1688
         CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
#endif
         COMPRESS = CompressCmd
          GZIPCMD = GzipCmd
alanh's avatar
alanh committed
1689
1690
1691
1692
1693
#ifdef CrossCompileDir
              CPP = CrossCppCmd $(STD_CPP_DEFINES)
           RAWCPP = CrossRawCppCmd $(STD_CPP_OPTIONS)
    PREPROCESSCMD = CrossPreProcessCmd $(STD_CPP_DEFINES)
#else
daryll's avatar
daryll committed
1694
1695
1696
              CPP = CppCmd $(STD_CPP_DEFINES)		/* simple filters */
           RAWCPP = RawCppCmd $(STD_CPP_OPTIONS)
    PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES)	/* prefered; mdep */
alanh's avatar
alanh committed
1697
#endif
daryll's avatar
daryll committed
1698
1699
          INSTALL = InstallCmd
     INSTALLFLAGS = InstallFlags
alanh's avatar
alanh committed
1700
1701
1702
#ifdef CrossCompileDir
               LD = CrossLdCmd
#else
daryll's avatar
daryll committed
1703
               LD = LdCmd
alanh's avatar
alanh committed
1704
#endif
daryll's avatar
daryll committed
1705
              LEX = LexCmd
alanh's avatar
alanh committed
1706
1707
               M4 = M4Cmd
          M4FLAGS = M4Flags
daryll's avatar
daryll committed
1708
1709
1710
           LEXLIB = LexLib
             YACC = YaccCmd
           CCYACC = CplusplusYaccCmd
alanh's avatar
alanh committed
1711
1712
1713
#ifdef CrossCompileDir
             LINT = CrossLintCmd
#else
daryll's avatar
daryll committed
1714
             LINT = LintCmd
alanh's avatar
alanh committed
1715
#endif
daryll's avatar
daryll committed
1716
1717
1718
1719
1720
1721
1722
      LINTLIBFLAG = LintLibFlag
         LINTOPTS = LintOpts
               LN = LnCmd
             MAKE = MakeCmd
               MV = MvCmd
               CP = CpCmd
#if DoRanlibCmd
alanh's avatar
alanh committed
1723
1724
1725
#ifdef CrossCompileDir
           RANLIB = CrossCompileDir/RanlibCmd
#else
daryll's avatar
daryll committed
1726
           RANLIB = RanlibCmd
alanh's avatar
alanh committed
1727
#endif
daryll's avatar
daryll committed
1728
1729
1730
  RANLIBINSTFLAGS = RanlibInstFlags
#endif
               RM = RmCmd
dawes's avatar
dawes committed
1731
1732
             PERL = PerlCmd
         PERLOPTS = PerlOptions
daryll's avatar
daryll committed
1733
1734
1735
1736
1737
        MANSUFFIX = ManSuffix		/* suffix for command man pages */
     LIBMANSUFFIX = LibManSuffix	/* suffix for library man pages */
    FILEMANSUFFIX = FileManSuffix	/* suffix for file format man pages */
    MISCMANSUFFIX = MiscManSuffix	/* suffix for misc man pages */
  DRIVERMANSUFFIX = DriverManSuffix	/* suffix for driver man pages */
dawes's avatar
dawes committed
1738
1739
     MANSRCSUFFIX = ManSrcSuffix	/* suffix for man page source */
     MANNEWSUFFIX = ManNewSuffix	/* suffix for preprocessed man source */
alanh's avatar
alanh committed
1740
          MANDEFS = AppLoadDefs FileManDefs LibManDefs MiscManDefs DriverManDefs ProjectManDefs $(XORGMANDEFS) $(VENDORMANDEFS)
dawes's avatar
dawes committed
1741
1742

   COMPRESSMANCMD = CompressManCmd
daryll's avatar
daryll committed
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752

            TROFF = TroffCmd
            NROFF = NroffCmd
         MSMACROS = MsMacros
        MANMACROS = ManMacros
              TBL = TblCmd
              EQN = EqnCmd
             NEQN = NeqnCmd
              COL = ColCmd
         COLFLAGS = ColFlags
alanh's avatar
alanh committed
1753
1754
1755
#ifdef CrossCompileDir
	    MODCC = CrossModuleCcCmd
#else
daryll's avatar
daryll committed
1756
            MODCC = ModuleCcCmd
alanh's avatar
alanh committed
1757
#endif
daryll's avatar
daryll committed
1758
1759
1760
1761
           MODCPP = ModuleCppCmd
        MODCFLAGS = ModuleCFlags
            MODAS = ModuleAsCmd
       MODASFLAGS = ModuleAsFlags
alanh's avatar
alanh committed
1762
1763
1764
#ifdef CrossCompileDir
	    MODLD = CrossModuleLdCmd
#else
daryll's avatar
daryll committed
1765
            MODLD = ModuleLdCmd
alanh's avatar
alanh committed
1766
#endif
daryll's avatar
daryll committed
1767
1768
1769
       MODLDFLAGS = ModuleLdFlags
MODLDCOMBINEFLAGS = ModuleLdCombineFlags
            MODAR = ModuleArCmd
alanh's avatar
alanh committed
1770
1771
1772
#ifdef CrossCompileDir
        MODRANLIB = CrossCompileDir/ModuleRanlibCmd
#else
daryll's avatar
daryll committed
1773
        MODRANLIB = ModuleRanlibCmd
alanh's avatar
alanh committed
1774
#endif
daryll's avatar
daryll committed
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
#if HasLatex
            DVIPS = DvipsCmd
            LATEX = LatexCmd
#endif
#if HasSentinel
         SENTINEL = SentinelCmd
  SENTINELOPTIONS = SentinelOptions
#endif
#if HasPurify
           PURIFY = PurifyCmd
    PURIFYOPTIONS = PurifyOptions
#endif
#if HasTestCenter
           PROOF = ProofCmd
    PROOFOPTIONS = ProofOptions
alanh's avatar
alanh committed
1790
1791
1792
#endif
#if CrossCompiling
          HOST_CC = HostCcCmd
daryll's avatar
daryll committed
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
#endif
     STD_INCLUDES = StandardIncludes
  STD_CPP_OPTIONS = StandardCppOptions
  STD_CPP_DEFINES = StandardCppOptions StandardCppDefines $(PROJECT_DEFINES)
      STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
 EXTRA_LOAD_FLAGS = ExtraLoadFlags
  EXTRA_LDOPTIONS = ExtraLoadOptions
  EXTRA_LIBRARIES = MallocLibraries ExtraLibraries Krb5Libraries
             TAGS = TagsCmd
#if ConstructMFLAGS
           MFLAGS = -$(MAKEFLAGS)
#endif
#if ConstructMAKEFLAGS
        MAKEFLAGS = $(MFLAGS)
#endif
   PARALLELMFLAGS = ParallelMakeFlags
#if HasSharedLibraries
    SHAREDCODEDEF = SharedCodeDef
         SHLIBDEF = SharedLibraryDef
#ifdef SharedLibraryLoadFlags
alanh's avatar
alanh committed
1813
     SHLIBLDFLAGS = SharedLibraryLoadFlags $(SHLIBGLOBALSFLAGS)
daryll's avatar
daryll committed
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
#endif
/*
 * Here we set up flags needed to produce position-independent code 
 * when doing C and C++ compilation.  The default if you specify C
 * PIC flags without also specifying C++ PIC flags is to assume that 
 * the C flags work for both.  If your C++ compiler requires different
 * flags, specify them explicitly in PositionIndependentCplusplusFlags.
 */
#ifdef PositionIndependentCFlags
         PICFLAGS = PositionIndependentCFlags
#endif
#ifdef PositionIndependentCplusplusFlags
      CXXPICFLAGS = PositionIndependentCplusplusFlags
#else
#ifdef PositionIndependentCFlags
      CXXPICFLAGS = PositionIndependentCFlags
#endif
#endif
#endif
#if !HasVoidSignalReturn
   SIGNAL_DEFINES = -DSIGNALRETURNSINT
#endif
/*
 * The following supports forcing of function prototypes
 */
#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
#define _funcprotodef -DFUNCPROTO=15
#else
#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
#define _funcprotodef -DFUNCPROTO=11
#else
#if NeedFunctionPrototypes && NeedNestedPrototypes
#define _funcprotodef -DFUNCPROTO=9
#else
#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
#define _funcprotodef -DFUNCPROTO=7
#else
#if NeedFunctionPrototypes && NeedConstPrototypes
#define _funcprotodef -DFUNCPROTO=5
#else
#if NeedFunctionPrototypes && NeedVarargsPrototypes
#define _funcprotodef -DFUNCPROTO=3
#else
#if NeedFunctionPrototypes
#define _funcprotodef -DFUNCPROTO
#else
#define _funcprotodef /**/
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#if NeedWidePrototypes
#define _wideprotodef /**/
#else
#define _wideprotodef -DNARROWPROTO
#endif
    PROTO_DEFINES = _funcprotodef _wideprotodef 
#undef _funcprotodef
#undef _wideprotodef

#if StripInstalledPrograms
     INSTPGMFLAGS = InstPgmFlags	/* install flags for stripping */
#else
     INSTPGMFLAGS = 
#endif
     INSTBINFLAGS = InstBinFlags	/* install flags for programs */
     INSTUIDFLAGS = InstUidFlags	/* install flags for setuid programs */
     INSTLIBFLAGS = InstLibFlags	/* install flags for libraries */
     INSTINCFLAGS = InstIncFlags	/* install flags for headers */
     INSTMANFLAGS = InstManFlags	/* install flags for man pages */
     INSTDATFLAGS = InstDatFlags	/* install flags for data files */
    INSTKMEMFLAGS = InstKmemFlags	/* install flags for /dev/kmem progs */

#ifdef ProjectRoot
      PROJECTROOT = ProjectRoot
#endif
#ifdef UseInstalled
# if AlternateIncRoot
#  define TopInclude	-I$(INCROOT)
# else
#  define TopInclude	/**/
# endif
#else
# define TopInclude	-I$(TOP)
#endif
alanh's avatar
alanh committed
1902

daryll's avatar
daryll committed
1903
1904
1905
1906
1907
1908
1909
1910
1911
      CDEBUGFLAGS = DefaultCDebugFlags
        CCOPTIONS = DefaultCCOptions	/* to distinguish from param flags */
/*
 * STD_INCLUDES contains system-specific includes
 * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
 * EXTRA_INCLUDES contains project-specific includes set in project incfiles
 * INCLUDES contains client-specific includes set in Imakefile
 * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
 */
dawes's avatar
dawes committed
1912
      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES)
dawes's avatar
dawes committed
1913
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES)
daryll's avatar
daryll committed
1914
1915
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
alanh's avatar
alanh committed
1916
         LDPRELIB = LdPreLib $(INSTALLED_LIBS)
daryll's avatar
daryll committed
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
        LDPOSTLIB = LdPostLib
        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
     CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)

           LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
#if HasBrokenCCForLink
           CCLINK = LdCmd
#else
#if AlternateUsrLibDir && HasLdRunPath
       CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
           CCLINK = $(CCENVSETUP) $(CC)
#else
           CCLINK = $(CC)
#endif
#endif
#if AlternateUsrLibDir && HasLdRunPath
      CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
          CXXLINK = $(CXXENVSETUP) $(CXX)
#else
          CXXLINK = $(CXX)
#endif
     LDSTRIPFLAGS = LdStripFlags
   LDCOMBINEFLAGS = LdCombineFlags
      DEPENDFLAGS = DependFlags
dawes's avatar
dawes committed
1941
   DEPEND_DEFINES = DependDefines
daryll's avatar
daryll committed
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956

XCOMM Not sure this belongs here
         TKLIBDIR = TkLibDir
         TKINCDIR = TkIncDir
        TKLIBNAME = TkLibName
        TKLIBRARY = TkLibrary
        TCLLIBDIR = TclLibDir
        TCLINCDIR = TclIncDir
       TCLLIBNAME = TclLibName
       TCLLIBRARY = TclLibrary

        MACROFILE = MacroFile
           RM_CMD = $(RM)

    IMAKE_DEFINES = /* leave blank, for command line use only */
alanh's avatar
alanh committed
1957
   IMAKE_WARNINGS = ImakeWarningFlags
daryll's avatar
daryll committed
1958
1959
#ifdef UseInstalled
         IRULESRC = $(CONFIGDIR)	/* used in rules file */
alanh's avatar
alanh committed
1960
1961
        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) \
		    $(IMAKE_WARNINGS)
daryll's avatar
daryll committed
1962
1963
#else
         IRULESRC = $(CONFIGSRC)/cf
alanh's avatar
alanh committed
1964
        IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
daryll's avatar
daryll committed
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
#endif
#if !HasClearmake
     /* clearmake records relevant defines and flags in the build script,
	so it knows when they change and we don't need this coarser-level
	dependency.  We also don't want it, since it prevents sharing if
	even one config file, say site.def or host.def, changes. */
     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
			$(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
			OtherIConfigFiles SiteIConfigFiles $(EXTRA_ICONFIGFILES)
#endif

#ifndef TopLevelProject
# define TopLevelProject	X11
#endif
#ifndef ProjectRulesFile
# define ProjectRulesFile	Concat3(<,TopLevelProject,.rules>)
#endif
#include ProjectRulesFile
#ifndef LocalRulesFile
/* need this to make ANSI-style preprocessors happy */
#define LocalRulesFile <noop.rules>
#endif
#include LocalRulesFile

/*
 * get project-specific configuration and rules
 */
#ifndef ProjectTmplFile
#define ProjectTmplFile		Concat3(<,TopLevelProject,.tmpl>)
#endif
#include ProjectTmplFile
#ifndef LocalTmplFile
/* need this to make ANSI-style preprocessors happy */
#define LocalTmplFile <noop.rules>
#endif
#include LocalTmplFile

alanh's avatar
alanh committed
2002
2003
2004
2005
#if !BuildLibraries && AlternateIncRoot
INSTALLED_INCLUDES = -I$(INCROOT)
#endif

alanh's avatar
alanh committed
2006
2007
2008
#if !defined(UseInstalled) && !BuildLibraries && AlternateUsrLibDir
INSTALLED_LIBS = -L$(USRLIBDIR)
#endif
alanh's avatar
alanh committed
2009

daryll's avatar
daryll committed
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
#ifdef FixupLibReferences
FixupLibReferences()
#endif

/* ConfigDir comes from X11.tmpl */
        CONFIGDIR = ConfigDir		/* build configuration information */
#if HasClearmake
           OSNAME = OSName
#endif
    USRLIBDIRPATH = UsrLibDirPath
alanh's avatar
alanh committed
2020
        LDPRELIBS = LdPreLibs $(INSTALLED_LIBS)
daryll's avatar
daryll committed
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
       LDPOSTLIBS = LdPostLibs
     TOP_INCLUDES = TopIncludes
  PROJECT_DEFINES = ProjectDefines
#if HasCplusplus
CXXPROJECT_DEFINES = CplusplusProjectDefines
#endif

XCOMM ----------------------------------------------------------------------
XCOMM start of Imakefile
#include INCLUDE_IMAKEFILE

XCOMM ----------------------------------------------------------------------
XCOMM common rules for all Makefiles - do not edit

.c.i:
	CPPOnlyCompile($*.c,$(_NOOP_))

.SUFFIXES: .s

.c.s:
	CompileCToAsm($(_NOOP_))

/*
 * These need to be here so that rules in Imakefile occur first;  the blank
 * emptyrule is to make sure that an empty Imakefile does not default to make
 * clean.
 */
emptyrule::

CleanTarget()

#ifndef IHaveSpecialMakefileTarget
MakefileTarget()
#endif

alanh's avatar
alanh committed
2056
2057
2058
2059
#if BuildHtmlManPages
RmanDependency()
#endif

daryll's avatar
daryll committed
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
TagsTarget()
#ifdef MakefileAdditions
MakefileAdditions()
#endif

CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))

CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))

ManKeywordsTarget($(MANPATH))

alanh's avatar
alanh committed
2071
2072
HtmlManIndex

dawes's avatar
dawes committed
2073
2074
2075
2076
2077
2078
2079
/* Generate the "real" clean rules */
#undef clean

clean:: cleandir

distclean:: cleandir

daryll's avatar
daryll committed
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
#ifdef IHaveSubdirs
XCOMM ----------------------------------------------------------------------
XCOMM rules for building in SUBDIRS - do not edit

InstallSubdirs($(SUBDIRS))
InstallManSubdirs($(SUBDIRS))
InstallDriverSDKSubdirs($(SUBDIRS))
CleanSubdirs($(SUBDIRS))
TagSubdirs($(SUBDIRS))
MakefileSubdirs($(SUBDIRS))
IncludesSubdirs($(SUBDIRS))

dawes's avatar
dawes committed
2092
2093
2094
2095
2096
2097
2098
/* "distclean" subdirectories */
#undef  BootstrapCleanSubdirs
#define BootstrapCleanSubdirs /**/
#define clean distclean
CleanSubdirs($(SUBDIRS))
#undef clean

daryll's avatar
daryll committed
2099
2100
2101
#endif

/* must be after all install.man rules that install anything */
alanh's avatar
alanh committed
2102
2103
2104
#ifndef MakeManKeywords
#define MakeManKeywords		NO
#endif
daryll's avatar
daryll committed
2105
2106
2107
2108
#if MakeManKeywords		/* typically only at top level */
install.man:: man_keywords
#endif

alanh's avatar
alanh committed
2109
/* must be after all install.man rules that install anything */
alanh's avatar
alanh committed
2110
2111
2112
#ifndef MakeHtmlManIndex
#define MakeHtmlManIndex	NO
#endif
alanh's avatar
alanh committed
2113
2114
2115
2116
#if MakeHtmlManIndex		/* typically only at top level */
install.man:: html_index
#endif

daryll's avatar
daryll committed
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
#ifndef IHaveSubdirs
XCOMM ----------------------------------------------------------------------
XCOMM empty rules for directories that do not have SUBDIRS - do not edit

install::
	@echo "install in $(CURRENT_DIR) done"

install.man::
	@echo "install.man in $(CURRENT_DIR) done"

install.sdk::
	@echo "install.sdk in $(CURRENT_DIR) done"

Makefiles::

includes::

depend::

#endif /* if subdirectory rules are needed */

dawes's avatar
dawes committed
2138
#ifndef IHaveSpecialMakefileTarget
alanh's avatar
alanh committed
2139
/* "distclean" also removes the Makefile and the depend file */
dawes's avatar
dawes committed
2140
distclean::
alanh's avatar
alanh committed
2141
	RemoveFiles(Makefile DependFileName)
dawes's avatar
dawes committed
2142
2143
#endif

daryll's avatar
daryll committed
2144
2145
2146
XCOMM ----------------------------------------------------------------------
XCOMM dependencies generated by makedepend
IncludeMakefile(DependFileName)