sequent.cf revision 11d341ca
1XCOMM platform:  $XConsortium: sequent.cf$
2
3/*
4 * SET VERSION NUMBERS BEFORE MAKING MAKEFILES; also, you'll need to install
5 * util/scripts/bsdinstall.sh before doing a "make install"
6 */
7
8/*
9 * Version numbers are set one of two ways:
10 *
11 * If the target version is different than the machine you are building on,
12 * set the target versions using the environmental variable IMAKEINCLUDES.
13 * Example: IMAKEINCLUDES="-I. -DOSMajorVersion=4 -DOSMinorVersion=4"
14 * This is usually only done at Sequent when building a product using
15 * cross compiling tools and target headers and libraries.
16 *
17 * Otherwise, the imake will use uname(2) to calculate the default to be
18 * the same as the machine you are building on.  The X11R6 imake will set
19 * DefaultOS*Version macros to be these default values.
20 * Those default values will be used in the assignments below.
21 * This is the recommended method to be used by customers.
22 */
23
24				/* defaults from imake via uname(2) */
25#ifndef OSName
26#define OSName			DefaultOSName
27#endif
28#ifndef OSMajorVersion
29#define OSMajorVersion		DefaultOSMajorVersion
30#endif
31#ifndef OSMinorVersion
32#define OSMinorVersion		DefaultOSMinorVersion
33#endif
34#ifndef OSTeenyVersion
35#define OSTeenyVersion		DefaultOSTeenyVersion
36#endif
37XCOMM operating system:  OSName V/**/OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion
38
39/*
40 * Sequent Dynix/PTX 4.x.x (SVR4) and later operating systems.
41 *
42 * Sequent Dynix/PTX 4.2.3 and later operating systems are supported with
43 * the X11R6 sequent.cf and other X11R6 configuration files.
44 * Specifically 4.4.2 and later have been tested.
45 *
46 * Attempting to use these X11R6 configuration files and X11R6 source files
47 * with early versions of Dynix/PTX 4.x.x may work, however that will not be
48 * tested or supported at Sequent.
49 * Sequent Dynix/PTX 2.1.x has been retired so support for it and earlier
50 * releases has been removed.
51 */
52
53#if OSMajorVersion >= 4
54
55#define SystemV4		YES
56#define SequentVersionDefines	-DSVR4
57#define ExtraLibraries		
58#define ForceNormalLib		YES
59#define HasRequiredLibs		YES
60#define NeedBerklib		NO	/* gettimeofday in libc */
61
62#define XmExtraLibraries	/* for ABI-compliance do not use -lgen here */
63#define MotifDefines		-DXM_STRINGS_1_2_2_STATE  /* code review */
64
65/* initial port does not use multiple socket libs, default libsocket.so.1.1 */
66#define HasMultipleSockets	NO	/* obsolete */ /* only libsocket.so.1.1 */
67
68#endif /* OSMajorVersion >= 4 */
69
70/*
71 * Below this line are generic defines that apply to all Sequent systems.
72 * However they are currently tested with only OSMajorVersion >= 4
73 */
74
75/*
76 * The following cpp macro defines are order independent,
77 * since the right-hand-side is constant.
78 * Therefore these are simply listed in alphabetical order.
79 * Macros defined later may use these definitions.
80 */
81
82/* 
83 * Threads.tmpl cpp macros.
84 * Sequent overrides the Threads.tmpl defaults with the values below.
85 * Sequent has native threads for ptx 4.5.0 and higher.
86 */
87
88#if ( OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 5) )
89
90#define HasPosixThreads			YES
91#define HasThreadSafeAPI		YES
92#define ThreadedX			YES
93#define ThreadsLibraries		/**/
94#define ThreadsCplusplusLibraries	/**/
95#define ThreadPreStdAPIDefines		/**/
96#define ThreadsCompileFlags		-Kthread
97#define ThreadsCplusplusCompileFlags	-Kthread
98#define SharedThreadReqs		/**/
99
100/*
101 * THREADS macro and environment variable used with Sequent commands only.
102 * We use THREADS rather than the generic X11 THREADS_CFLAGS because we 
103 * want to ensure that the macro is defined for all compiles and not just
104 * those Makefiles built from a Imakefile that includes Threads.tmpl.
105 *
106 * Sequent compiler option -Kthread will also define -D_SEQUENT_THREADS.
107 * Currently using -Kthread is the recommended interface to this define.
108 * Currently there are no extra includes files using -D_SEQUENT_THREADS.
109 * Currently no reason for makedepend or cpp to use -D_SEQUENT_THREADS.
110 * If needed in the future, we would add to ProjectThreadsDefines
111 *
112 * #define ProjectThreadsDefines -DXTHREADS -D_SEQUENT_THREADS
113 */
114
115  THREADS = -Kthread
116
117#endif /* ptx 4.5.0 or greater has threads */
118
119/* 
120 * Imake.tmpl cpp macros.
121 * Sequent overrides the Imake.tmpl defaults with the values below.
122 */
123
124#define BuildLibPathVar		LD_LIBRARY_PATH
125#define DefaultCCOptions	-Xa
126#define ExpandManNames		YES
127#define ExtraFilesToClean	*.z
128#define HasNdbm			YES
129#define HasShadowPasswd		YES
130#define HasSockets		YES	/* default */
131#define HasVarDirectory		NO
132#ifdef UseInstalled
133#define InstallCmd $(BINDIR)/ptxinst -t "$(TOOLS)"
134#else
135#define InstallCmd $(SHELL) $(SCRIPTSRC)/ptxinst.sh
136#endif /* UseInstalled */
137#define InstPgmFlags		-s -m 0555 -o bin -g bin
138#define InstBinFlags		-s -m 0555 -o bin -g bin
139#define InstLibFlags		-m 0444 -o bin -g bin
140#define InstShLibFlags		-m 0555 -o bin -g bin
141#define Malloc0ReturnsNull	YES
142#define ManSuffix	1		/* use just one tab or cpp will die */
143#define LibManSuffix	3x		/* use just one tab or cpp will die */
144#define LibmanDir	$(MANSOURCEPATH)3
145#define MiscManSuffix	5x		/* use just one tab or cpp will die */
146#define MiscManDir	$(MANSOURCEPATH)5
147#define MkdirHierCmd		mkdir -p
148#define NeedConstPrototypes     YES
149#define NeedFunctionPrototypes  YES
150#define NeedNestedPrototypes    YES
151#define NeedVarargsPrototypes   YES
152#define StripInstalledPrograms	YES
153#define SystemManDirectory	/usr/catman
154#define TermcapLibrary		-lcurses	/* code review for SVR4 ? */
155#define TerminfoDir		/usr/lib/terminfo	/* Sequent addition */
156#define ToolkitStringsABIOptions -intelabi
157
158
159/* 
160 * X11.tmpl cpp macros.
161 * Sequent overrides the X11.tmpl defaults with the values below.
162 */
163
164#define BuildDps		YES
165#define BuildServer		YES
166#define BuildXF86DGA		NO	/* DGA has no meaning on Sequent HW */
167#define BuildXF86MiscExt	NO	/* turn off the server portion */
168#define BuildXF86VidModeExt	NO	/* turn off the server portion */
169#define BuildXInputExt		YES
170#define BuildXKBuilib		YES	/* override NO set in xorg.cf */
171#define ConnectionFlags		-DTCPCONN
172#define DefaultSystemPath	/bin:/etc:/usr/bin:$(BINDIR)
173#define DefaultUserPath		:/bin:/usr/bin:$(BINDIR)
174#define HasPlugin		YES
175#define HasXServer		NO
176#define InstallFSConfig		YES	/* safe since we install to DESTDIR */
177#define InstallXdmConfig	YES	/* safe since we install to DESTDIR */
178#define MotifBC			NO	/* default, code review from X11R5  */
179#define XdmServersType	fs	/* One tab here.  Needed if BuildServer YES */
180#define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC
181#define XprtServer		YES
182#define XVirtualFramebufferServer	YES
183#define XF86SVGAServer		NO	/* Don't build the XFree86 servers */
184#define XF86S3Server		NO
185#define XF86S3VServer		NO
186#define XF86I8514Server		NO
187#define XF86Mach8Server		NO
188#define XF86Mach32Server	NO
189#define XF86Mach64Server	NO
190#define XF86P9000Server		NO
191#define XF86AGXServer		NO
192#define XF86I128Server		NO
193#define XF86GLINTServer		NO
194#define XF86REALimageServer	NO
195
196/* 
197 * Motif.tmpl cpp macros.
198 * Sequent overrides the Motif.tmpl default with the values below.
199 */
200
201#define GencatCmd             /usr/lbin/gencat
202
203/* Port Sequent macro DontBuildMotifConfig to Motif 2.1 */
204/*
205 * #ifndef MetroLink
206 * #define DontBuildMotifConfig
207 * #endif
208 */
209
210/* 
211 * Sequent added cpp macros.
212 * 
213 * The following cpp macro defines have been introduced by Sequent.
214 * They will be referenced in Sequent patches sent to TOG.
215 * They may be moved above if accepted by TOG or X.org.
216 */
217
218#define AdminBaseDir		  /usr/admin.ptx/etc/base.dir
219#define MessageCatDir		  /usr/lib/message/C
220#define NeedXinputAlias		  YES
221#define UseHidesymsLists	  YES
222#define XlbiffMailPath		  /usr/mail/%s	/* used by contrib xlbiff */
223
224/* 
225 * Imake.tmpl, X11.tmpl, or other order dependent cpp defines.
226 *
227 * The following cpp macro defines are order dependent.
228 * They depend on previously defined cpp macros.
229 * Do not change the order.
230 */
231#define SharedLibraryCCOptions	DefaultCCOptions
232#define StandardDefines		SequentVersionDefines -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion -DANSICPP -DDYNIX_C2 -DMetroLink
233#define StandardCppDefines	StandardDefines -D_SOCKET_VERSION=11 -DUnixCpp
234
235#ifdef ProjectRoot
236#define ManDirectoryRoot	ProjectRoot/**//catman
237#else
238#define ManDirectoryRoot	SystemManDirectory
239#endif
240#define XmanSearchPath		ManDirectoryRoot /* for X11R5 xman */
241
242/* 
243 * Sequent configuration environment specific to building X11 and Motif.
244 * This environment is only available when UseInstalled is not defined.
245 * Therefore this environment is not used by customers using xmkmf.
246 */
247
248#ifndef UseInstalled
249
250/* Product builds using local X11 and Motif trees */
251
252/*
253 * Provide libraries needed by nonX programs in the X11 build tree.
254 * These are not standard so the customer will be forced to add them to their
255 * Imakefile SYS_LIBRARIES if needed.  An ABI program may not want or need them,
256 * so we do not include them in the ExtraLibraries provided to customers
257 * when UseInstalled is defined.  We add them here as a convenience when
258 * building the entire X11 tree (at Sequent or the contractor).
259 */
260#undef ExtraLibraries
261#define ExtraLibraries	-lsocket -lnsl
262
263/*
264 * Sequent builds X11 and Motif in the same tree.
265 * The Motif project files include the X11 project files.
266 *
267 * Later we may use the Local project files similer the the lynx.cf
268 *
269 * #define LocalTmplFile		<Motif.tmpl>
270 * #define LocalRulesFile		<Motif.rules>
271 */
272
273/* Try the Metro Link method. */
274
275#ifndef MetroLink
276#undef ProjectTmplFile
277#define ProjectTmplFile		<Motif.tmpl>
278#undef ProjectRulesFile
279#define ProjectRulesFile	<Motif.rules>
280#endif
281
282/*
283 * Later change to Metro Link directory layout,
284 * or allow $(TOP)/../motif21
285 */
286
287/* Try the Metro Link method. */
288
289#ifndef MetroLink
290#define MTop $(TOP)/motif21
291#endif
292
293/*
294 * Set the Program macros to be correct for the target machine.
295 * This will avoid using any crosstools as hardwired strings
296 * built into binaries that will run on the target machine.
297 *
298 * These macro names need to be ported from X11R5 to X11R6.
299 */
300#define ArProgramBase	ar
301#define CppProgram	/lib/cpp
302#define CcProgram	cc
303#define RanlibProgram	ranlib
304
305/*
306 * Build all the X11 debug libaries *_d.a for use by Sequent Service
307 */
308
309/*
310 * Set DebugLibDefault YES for Sequent to build all debug libs.
311 * If we move this to generic code to *.tmpl files,
312 * use the default code below that sets the default NO
313 */
314
315#define DebugLibDefault		NO
316
317#ifndef DebugLibDefault
318#define DebugLibDefault		NO
319#endif
320
321#define DebugLibX11		DebugLibDefault	/* debugged X library */
322#define DebugLibXext		DebugLibDefault	/* debugged Xext library */
323#define DebugLibXau		DebugLibDefault	/* debugged auth library */
324#define DebugLibXdmcp		DebugLibDefault	/* debugged XDMCP library */
325#define DebugLibXmu		DebugLibDefault	/* debugged Xmu library */
326#define DebugLibXp              DebugLibDefault	/* debugged Xp library */
327#define DebugLibXt		DebugLibDefault	/* debugged toolkit library */
328#define DebugLibXa		DebugLibDefault	/* debugged audio library */
329#define DebugLibXaw		DebugLibDefault	/* debugged widget library */
330#define DebugLibXi		DebugLibDefault	/* debugged Xi library */
331#define DebugLibXtst		DebugLibDefault	/* debugged Xtst library */
332#define DebugLibICE		DebugLibDefault	/* debugged ICE library */
333#define DebugLibSM		DebugLibDefault	/* debugged SM library */
334#define DebugLibXkey		DebugLibDefault	/* debugged Xkey library */
335#define DebugLibFS		DebugLibDefault	/* debugged FS library */
336
337/*
338 * Build all the Motif debug libaries *_d.a for use by Service
339 */
340#define DebugLibXm		DebugLibDefault
341#define DebugLibMrm		DebugLibDefault
342#define DebugLibUil		DebugLibDefault
343
344/*
345 * Build all the Adobe DPS debug libaries *_d.a for use by Service
346 */
347#define DebugLibDps		DebugLibDefault
348
349#endif /* ! UseInstalled */
350
351/*
352 * Sequent general make macros.
353 * X11R6.5 should migrate these to Imake.tmpl.
354 */
355
356XCOMM Sequent general make macros.
357
358#ifndef PackCmd
359#define PackCmd pack
360#endif
361            PACK = PackCmd
362
363/*
364 * Sequent unique make macros.  These will always be unique to Sequent.
365 * We introduce them here in sequent.cf since cpp macros are set in sequent.cf.
366 * We may later move them to sequentLib.tmpl.
367 */
368
369XCOMM Sequent unique make macros.
370
371     ADMINBASEDIR = AdminBaseDir
372    MESSAGECATDIR = MessageCatDir
373
374/*
375 * DPS default values (unique to sequent)
376 */
377#ifndef PswrapCmd
378#define PswrapCmd     pswrap
379#endif
380
381#ifdef UseHidesymsLists
382
383#ifndef HidesymsCmd
384#define HidesymsCmd /usr/lib/hidesyms/hidesyms
385#endif
386#ifndef HsAcppCmd
387#define HsAcppCmd /lib/acpp
388#endif
389/*
390 * When building in the X11 tree.
391 * For shared libs,   hidesyms executes in a subdir.
392 * For unshared libs, hidesyms executes in a subsubdir.
393 * Therefore we add both of these to the acpp path:
394 * ../../$(BUILDINCROOT)/lib/hidesyms:../$(BUILDINCROOT)/lib/hidesyms
395 */
396#ifndef HsAcppLocalPath
397# define HsAcppLocalPath ../../$(BUILDINCROOT)/lib/hidesyms:../$(BUILDINCROOT)/lib/hidesyms
398#endif
399#ifndef HsAcppSystemPath
400# define HsAcppSystemPath /usr/lib/hidesyms
401#endif
402#ifndef HsAcppPath
403# ifdef UseInstalled
404# define HsAcppPath HsAcppSystemPath
405# else
406# define HsAcppPath HsAcppLocalPath:HsAcppSystemPath
407# endif /* UseInstalled */
408#endif
409/* 
410 * note: -DABI_SHARED_OBJECT requires a temporary fix added to 
411 * Xt/Error.c to provide missing _abi_* routines not in libc.so.1.
412 * When the base adds those missing _abi_* to libc.so.1,
413 * then the code in Xt/Error.c can be removed and the corresponding
414 * symbols added to Xt/libXt.hs can be removed.
415 */
416#ifndef HsAcppDefines
417#define HsAcppDefines -DABI_SHARED_OBJECT -D_SOCKET_VERSION=11 $(THREADS_DEFINES)
418#endif
419
420/*
421 * For shared libs, hidesyms executes in a subdir,
422 * therefore we add a -L../$(BUILDLIBDIR)
423 */
424#ifndef LdPreLib
425#ifndef UseInstalled
426#define LdPreLib -L$(BUILDLIBDIR) -L../$(BUILDLIBDIR)
427#endif
428#endif
429
430XCOMM HIDESYMS is for filtering system library symbols.
431
432         HIDESYMS = HidesymsCmd
433       HSACPPPATH = HsAcppPath
434        HSACPPCMD = HsAcppCmd
435    HSACPPDEFINES = HsAcppDefines
436           HSACPP = $(HSACPPCMD) -Y $(HSACPPPATH) $(HSACPPDEFINES)
437            HSCMD = $(HIDESYMS) -z -p "$(HSACPP)"
438
439#endif /* UseHidesymsLists */
440
441#if OSMajorVersion >= 4
442#include <xorg.cf>
443#include <sequentLib.rules>	/* include after macros, before Motif.rules */
444#endif /* OSMajorVersion >= 4 */
445