source: trunk/third/motif/config/Motif.tmpl @ 12423

Revision 12423, 13.0 KB checked in by ghudson, 26 years ago (diff)
Linux and NetBSD support, from source-sipb.
Line 
1/*
2 * (c) Copyright 1989, 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
3 * ALL RIGHTS RESERVED
4*/
5/*
6 * Motif Release 1.2.4
7*/
8XCOMM   $RCSfile: Motif.tmpl,v $ $Revision: 1.2 $ $Date: 1999-01-30 03:43:13 $
9
10/* Include AFTER Project.tmpl */
11
12/* Redefining MKDIRHIER if necessary                    */
13/* It should go away if the definition of MKDIRHIER     */
14/* is protected by #ifndef in Project.tmpl              */
15
16#ifdef MkDirHier
17     MKDIRHIER  = MkDirHier
18#endif
19
20#ifdef AUTOMATION
21#ifndef Automation
22#define Automation      YES
23#endif
24#else
25#define NO_AUTOMATION
26#endif
27
28#ifdef USE_VISTACC
29#ifndef UseVista
30#define UseVista
31#endif
32#ifndef CATCMD
33#define CATCMD cat
34#endif
35#endif
36
37#ifdef USE_PURIFY
38#ifndef UsePurify
39#define UsePurify
40#endif
41#endif
42
43#ifdef DEBUG_GEOMETRY
44#ifndef DebugGeometry
45#define DebugGeometry YES
46#endif
47#endif
48
49/*  Don't collide with the X installed flag */
50
51#ifndef _MUse
52#ifdef UseInstalledMotif
53#define _MUse(a,b) a
54#else
55#define _MUse(a,b) b
56#endif
57#endif
58
59#ifndef _MUseCat
60#if __STDC__ && !defined(UnixCpp)
61#ifdef UseInstalledMotif
62#define _MUseCat(a,b,c) a##c
63#else
64#define _MUseCat(a,b,c) b##c
65#endif
66#else
67#ifdef UseInstalledMotif
68#define _MUseCat(a,b,c) a/**/c
69#else
70#define _MUseCat(a,b,c) b/**/c
71#endif
72#endif
73#endif
74
75/* As default Motif is in X tree */
76#ifndef MTop
77#define MTop $(TOP)
78#endif
79
80/* Change this to point to your X tree */
81#ifndef XTop
82#define XTop $(TOP)
83#endif
84
85#ifndef MotifDefines
86#define MotifDefines /**/
87#endif
88
89#ifndef XmDefines
90#define XmDefines /**/
91#endif
92
93#ifndef LibraryDefines
94#define LibraryDefines StandardDefines MotifDefines
95#endif
96
97/* To compile without SHAPE extension, set this to -DNO_SHAPE */
98#ifndef MwmDefines
99#define MwmDefines /**/
100#endif
101
102#ifndef UilFlags
103#define UilFlags /**/
104#endif
105
106#ifndef TestDefines
107#define TestDefines -DMOTIF1_2 -DX11R5
108#endif
109
110#ifndef AutoDefines
111#if Automation
112#define AutoDefines -DAUTOMATION
113#else
114#define AutoDefines /**/
115#endif
116#endif
117
118#ifndef AutoIncludes
119#if Automation
120#define AutoIncludes -I$(AUTOSCRIPTSRC)
121#else
122#define AutoIncludes /**/
123#endif
124#endif
125
126#ifdef UsePurify
127#define PurifyFilesToClean *.pure_linkinfo *.pure_hardlink
128#else
129#define PurifyFilesToClean
130#endif
131#if Automation
132#define TestExtraFilesToClean *.Dat *.Scr PurifyFilesToClean
133#else
134#define TestExtraFilesToClean *.Dat PurifyFilesToClean
135#endif
136
137#ifndef UsrIncDir
138#define UsrIncDir IncRoot
139#endif
140
141#ifndef XBuildIncRoot
142#define XBuildIncRoot $(XTOP)
143#endif
144
145/* Place to install .uid files */
146#ifndef UidDir
147#define UidDir $(LIBDIR)/uid
148#endif
149
150#ifndef XmExtraLibraries
151#define XmExtraLibraries /**/
152#endif
153
154#ifndef YaccFlags
155#define YaccFlags /**/
156#endif
157
158#ifndef SharedLibXm
159#define SharedLibXm HasSharedLibraries
160#endif
161#ifndef SharedLibMrm
162#define SharedLibMrm HasSharedLibraries
163#endif
164#ifndef SharedLibUil
165#define SharedLibUil HasSharedLibraries
166#endif
167#ifndef SharedLibACommon
168#define SharedLibACommon HasSharedLibraries
169#endif
170#ifndef SharedLibScript
171#define SharedLibScript HasSharedLibraries
172#endif
173#ifndef SharedLibUtil
174#define SharedLibUtil HasSharedLibraries
175#endif
176#ifndef SharedLibCreate
177#define SharedLibCreate HasSharedLibraries
178#endif
179#ifndef SharedLibVisual
180#define SharedLibVisual HasSharedLibraries
181#endif
182#ifndef SharedLibSynth
183#define SharedLibSynth HasSharedLibraries
184#endif
185#ifndef SharedLibMCommon
186#define SharedLibMCommon HasSharedLibraries
187#endif
188
189#ifndef NormalLibXm
190#define NormalLibXm (!SharedLibXm | ForceNormalLib)
191#endif
192#ifndef NormalLibMrm
193#define NormalLibMrm (!SharedLibMrm | ForceNormalLib)
194#endif
195#ifndef NormalLibUil
196#define NormalLibUil (!SharedLibUil | ForceNormalLib)
197#endif
198#ifndef NormalLibACommon
199#define NormalLibACommon (!SharedLibACommon | ForceNormalLib)
200#endif
201#ifndef NormalLibScript
202#define NormalLibScript (!SharedLibScript | ForceNormalLib)
203#endif
204#ifndef NormalLibUtil
205#define NormalLibUtil (!SharedLibUtil | ForceNormalLib)
206#endif
207#ifndef NormalLibCreate
208#define NormalLibCreate (!SharedLibCreate | ForceNormalLib)
209#endif
210#ifndef NormalLibVisual
211#define NormalLibVisual (!SharedLibVisual | ForceNormalLib)
212#endif
213#ifndef NormalLibSynth
214#define NormalLibSynth (!SharedLibSynth | ForceNormalLib)
215#endif
216#ifndef NormalLibMCommon
217#define NormalLibMCommon (!SharedLibMCommon | ForceNormalLib)
218#endif
219
220#ifndef SharedXmRev
221#define SharedXmRev 1.2
222#endif
223#ifndef SharedMrmRev
224#define SharedMrmRev 1.2
225#endif
226#ifndef SharedUilRev
227#define SharedUilRev 1.2
228#endif
229#ifndef SharedACommonRev
230#define SharedACommonRev 1.2
231#endif
232#ifndef SharedScriptRev
233#define SharedScriptRev 1.2
234#endif
235#ifndef SharedUtilRev
236#define SharedUtilRev 1.2
237#endif
238#ifndef SharedCreateRev
239#define SharedCreateRev 1.2
240#endif
241#ifndef SharedVisualRev
242#define SharedVisualRev 1.2
243#endif
244#ifndef SharedSynthRev
245#define SharedSynthRev 1.2
246#endif
247#ifndef SharedMCommonRev
248#define SharedMCommonRev 1.2
249#endif
250
251#if HasSharedLibraries
252          SOXMREV = SharedXmRev
253         SOMRMREV = SharedMrmRev
254         SOUILREV = SharedUilRev
255     SOACOMMONREV = SharedACommonRev
256      SOSCRIPTREV = SharedScriptRev
257        SOUTILREV = SharedUtilRev
258      SOCREATEREV = SharedCreateRev
259      SOVISUALREV = SharedVisualRev
260       SOSYNTHREV = SharedSynthRev
261     SOMCOMMONREV = SharedMCommonRev
262#endif
263
264#ifndef XmClientLibs
265#define XmClientLibs $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
266#endif
267#ifndef XmClientDepLibs
268#define XmClientDepLibs $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
269#endif
270
271#ifndef MrmClientLibs
272#define MrmClientLibs $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
273#endif
274#ifndef MrmClientDepLibs
275#define MrmClientDepLibs $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
276#endif
277
278/*
279 * BuildClientLibs should be set to a version of MrmClientLibs that can be
280 * used to build uil and wmldbcreate.  On the initial build, MrmClientLibs
281 * may refer to shared libraries that may not be usable, since some systems
282 * require a separate install step.  The default is to use ".a" files
283 * initially, or the standard libraries if UseInstalledMotif is YES.
284 */
285#ifndef BuildClientLibs
286#ifdef UseInstalledMotif
287#define BuildClientLibs MrmClientLibs
288#else
289#define BuildClientLibs $(MRESOURCESRC)/libMrm.a $(MWIDGETSRC)/libXm.a $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
290#undef NormalLibXm
291#undef NormalLibMrm
292#define NormalLibXm YES
293#define NormalLibMrm YES
294#endif
295#endif
296#ifndef BuildClientDepLibs
297#ifdef UseInstalledMotif
298#define BuildClientDepLibs MrmClientDepLibs
299#else
300#define BuildClientDepLibs $(MRESOURCESRC)/libMrm.a $(MWIDGETSRC)/libXm.a $(DEPXTOOLLIB) $(DEPXLIB)
301#endif
302#endif
303
304#ifndef UilClientLibs
305#define UilClientLibs $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
306#endif
307#ifndef UilClientDepLibs
308#define UilClientDepLibs $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
309#endif
310
311#ifndef TestClientLibs
312#define TestClientLibs $(PURIFYLIBS) $(TESTMALFNS) $(TESTCOMLIB) \
313                $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
314                $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
315        $(XMLIB) $(TESTMALLOCLIB) $(TESTGEOLIB) $(XTOOLLIB) $(XLIB) \
316        $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
317#endif
318#ifndef TestUilClientLibs
319#define TestUilClientLibs $(PURIFYLIBS) $(TESTMALFNS) $(TESTCOMLIB) \
320                $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
321                $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
322        $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(TESTMALLOCLIB) $(TESTGEOLIB) \
323        $(XTOOLLIB) $(XLIB) $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
324#endif
325#ifndef TestClientDepLibs
326#define TestClientDepLibs XmClientDepLibs
327#endif
328#ifndef TestUilClientDepLibs
329#define TestUilClientDepLibs UilClientDepLibs
330#endif
331
332/* For separate Motif and X trees */
333
334              XTOP = XTop
335              MTOP = MTop
336     XBUILDINCROOT = XBuildIncRoot        /* base of X build loc */
337      XBUILDINCDIR = $(XBUILDINCROOT)/X11
338#if defined(UseInstalled) && !defined(UseInstalledMotif)
339          IRULESRC = $(CONFIGSRC)
340         IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES)
341#endif
342
343
344/* Redefine X locations */
345
346         CLIENTSRC = $(XTOP)/clients
347           DEMOSRC = $(XTOP)/demos
348            LIBSRC = $(XTOP)/lib
349           FONTSRC = $(XTOP)/fonts
350        INCLUDESRC = $(XTOP)/X11
351         SERVERSRC = $(XTOP)/server
352           UTILSRC = $(XTOP)/util
353        EXAMPLESRC = $(XTOP)/examples
354            DOCSRC = $(XTOP)/doc
355            RGBSRC = $(XTOP)/rgb
356      EXTENSIONSRC = $(XTOP)/extensions
357
358#ifdef UseInstalledMotif
359#if AlternateIncRoot
360      TOP_INCLUDES = -I$(INCROOT)               /* All installed; alt. root */
361#endif
362      UIL_INCLUDES = -I$(USRINCDIR)/uil
363#else
364#ifdef UseInstalled
365#if AlternateIncRoot
366      TOP_INCLUDES = -I$(MINCLUDESRC) -I/usr/X11R6/include
367#else
368      TOP_INCLUDES = -I$(MINCLUDESRC)           /* X installed; std. root */
369#endif
370#else
371      TOP_INCLUDES = -I$(MINCLUDESRC) -I$(XTOP) /* X and Motif source */
372#endif
373      UIL_INCLUDES = -I$(UILSRC)
374#endif
375
376      USRINCDIR = UsrIncDir
377         UIDDIR = UidDir
378        TESTSRC = $(MTOP)/tests
379        TESTLIB = $(TESTSRC)/lib
380  GENERALSRCLIB = $(TESTSRC)/General/lib
381  GENERALSRCBIN = $(TESTSRC)/General/bin
382   MANUALSRCLIB = $(TESTSRC)/Manual/lib
383   MANUALSRCBIN = $(TESTSRC)/Manual/bin
384     AUTOSRCLIB = $(TESTSRC)/Auto/lib
385     AUTOSRCBIN = $(TESTSRC)/Auto/bin
386       COMMONPP = $(GENERALSRCBIN)/Commonpp
387         GENRUN = $(GENERALSRCBIN)/Genrun
388         MANRUN = $(GENERALSRCBIN)/Manrun
389#ifdef DebugLib
390  TESTMALLOCSRC = $(GENERALSRCLIB)/Malloc
391#endif
392#ifdef DebugGeometry
393     TESTGEOSRC = $(TESTLIB)/Geometry
394#endif
395#ifdef Automation
396     TESTCOMSRC = $(AUTOSRCLIB)/Common
397  AUTOSCRIPTSRC = $(AUTOSRCLIB)/Script
398   AUTOSYNTHSRC = $(AUTOSRCLIB)/Synth
399  AUTOCREATESRC = $(AUTOSRCLIB)/Create
400  AUTOVISUALSRC = $(AUTOSRCLIB)/Visual
401    AUTOUTILSRC = $(AUTOSRCLIB)/Util
402  AUTOEXTRALIBS = -ll -ly -lm
403#else
404     TESTCOMSRC = $(MANUALSRCLIB)/Common
405#endif
406
407/* MTOOLKITSRC  should be removed */
408    MTOOLKITSRC = $(TOOLKITSRC)
409    MINCLUDESRC = $(MTOP)/X11
410        MLIBSRC = $(MTOP)/lib
411     MCLIENTSRC = $(MTOP)/clients
412       MDEMOSRC = $(MTOP)/demos
413     MWIDGETSRC = $(MLIBSRC)/Xm
414   MRESOURCESRC = $(MLIBSRC)/Mrm
415         UILSRC = $(MCLIENTSRC)/uil
416
417            UIL = _MUse(uil,$(UILSRC)/uil)
418         DEPUIL = _MUseCat($(BINDIR),$(UILSRC),/uil)
419
420   XMEXTRA_LIBS = XmExtraLibraries
421
422#ifndef UnsharedLibReferences
423#define UnsharedLibReferences(varname,libname,libsource) \
424Concat(DEP,varname) = _LibUseCat($(USRLIBDIR)/lib,libsource/lib,libname.a) @@\
425varname = LoaderLibPrefix _LibUse(Concat(-l,libname),$(Concat(DEP,varname)))
426#endif
427#ifndef SharedLibReferences
428#define SharedLibReferences(varname,libname,libsource,rev) \
429Concat(DEP,varname) = /**/                                            @@\
430varname = LoaderLibPrefix _LibUse(/**/,Concat(-L,libsource)) Concat(-l,libname)
431#endif
432
433#undef _LibUse
434#undef _LibUseCat
435#define _LibUse _MUse
436#define _LibUseCat _MUseCat
437
438#if SharedLibXm
439SharedLibReferences(XMLIB,Xm,$(MWIDGETSRC),$(SOXMREV))
440#else
441UnsharedLibReferences(XMLIB,Xm,$(MWIDGETSRC))
442#endif
443
444#if SharedLibMrm
445SharedLibReferences(MRESOURCELIB,Mrm,$(MRESOURCESRC),$(SOMRMREV))
446#else
447UnsharedLibReferences(MRESOURCELIB,Mrm,$(MRESOURCESRC))
448#endif
449
450#if SharedLibUil
451SharedLibReferences(UILLIB,Uil,$(UILSRC),$(SOUILREV))
452#else
453UnsharedLibReferences(UILLIB,Uil,$(UILSRC))
454#endif
455
456#ifdef DebugLib
457     TESTMALFNS = $(TESTMALLOCSRC)/MallocInit.o $(TESTMALLOCSRC)/MallocExit.o
458UnsharedLibReferences(TESTMALLOCLIB,Malloc,$(TESTMALLOCSRC))
459#endif
460
461#ifdef DebugGeometry
462UnsharedLibReferences(TESTGEOLIB,XtGeo,$(TESTGEOSRC))
463#endif
464
465
466#ifdef Automation
467
468#if SharedLibACommon
469SharedLibReferences(TESTCOMLIB,Common,$(TESTCOMSRC),$(SOACOMMONREV))
470#else
471UnsharedLibReferences(TESTCOMLIB,Common,$(TESTCOMSRC))
472#endif
473
474#if SharedLibScript
475SharedLibReferences(AUTOSCRIPTLIB,Script,$(AUTOSCRIPTSRC),$(SOSCRIPTREV))
476#else
477UnsharedLibReferences(AUTOSCRIPTLIB,Script,$(AUTOSCRIPTSRC))
478#endif
479
480#if SharedLibSynth
481SharedLibReferences(AUTOSYNTHLIB,Synth,$(AUTOSYNTHSRC),$(SOSYNTHREV))
482#else
483UnsharedLibReferences(AUTOSYNTHLIB,Synth,$(AUTOSYNTHSRC))
484#endif
485
486#if SharedLibCreate
487SharedLibReferences(AUTOCREATELIB,Create,$(AUTOCREATESRC),$(SOCREATEREV))
488#else
489UnsharedLibReferences(AUTOCREATELIB,Create,$(AUTOCREATESRC))
490#endif
491
492#if SharedLibVisual
493SharedLibReferences(AUTOVISUALLIB,Visual,$(AUTOVISUALSRC),$(SOVISUALREV))
494#else
495UnsharedLibReferences(AUTOVISUALLIB,Visual,$(AUTOVISUALSRC))
496#endif
497
498#if SharedLibUtil
499SharedLibReferences(AUTOUTILLIB,Util,$(AUTOUTILSRC),$(SOUTILREV))
500#else
501UnsharedLibReferences(AUTOUTILLIB,Util,$(AUTOUTILSRC))
502#endif
503
504#else   /* Manual */
505
506#if SharedLibMCommon
507SharedLibReferences(TESTCOMLIB,Common,$(TESTCOMSRC),$(SOMCOMMONREV))
508#else
509UnsharedLibReferences(TESTCOMLIB,Common,$(TESTCOMSRC))
510#endif
511
512#endif  /* Automation */
513
514
515
516#ifdef UsePurify
517     PURIFYLIBS = $(PURIFYHOME)/purify_stubs.a
518#endif
519  LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
520LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
521     LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
522     LINTUILLIB = $(UILSRC)/llib-lUil.ln
523
524      YACCFLAGS = YaccFlags
525       UILFLAGS = UilFlags
526
527         RM_CMD = $(RM) FilesToClean ExtraFilesToClean TestExtraFilesToClean
528
529    STD_DEFINES = StandardDefines MotifDefines
530
531#if NeedDefaultDepLibs
532/*
533 */
534#if HasSharedLibraries || UseInstalled
535        DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
536#else
537        DEPLIBS = $(LOCAL_LIBRARIES)
538#endif
539        DEPLIBS1 = $(DEPLIBS)
540        DEPLIBS2 = $(DEPLIBS)
541        DEPLIBS3 = $(DEPLIBS)
542#endif /* NeedDefaultDepLibs */
543
Note: See TracBrowser for help on using the repository browser.