4 * Copyright (c) 1990, 1991, 1992, 1993, 1998 The Open Group, Inc.
5 * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
6 * the full copyright text.
8 * (c) Copyright 1996 Digital Equipment Corporation.
9 * (c) Copyright 1996 Hewlett-Packard Company.
10 * (c) Copyright 1996 International Business Machines Corp.
11 * (c) Copyright 1996 Sun Microsystems, Inc.
12 * (c) Copyright 1996 Novell, Inc.
13 * (c) Copyright 1996 FUJITSU LIMITED.
14 * (c) Copyright 1996 Hitachi.
16 XCOMM $TOG: Motif.tmpl /main/6 1999/05/19 17:00:05 mgreess $
18 /* Include the X11 project template file. */
23 # define Automation YES
26 # define NO_AUTOMATION
45 # ifndef DebugGeometry
46 # define DebugGeometry YES
52 # if UseInstalledMotif
60 # if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
61 # if UseInstalledMotif
62 # define _MUseCat(a,b,c) a##c
64 # define _MUseCat(a,b,c) b##c
67 # if UseInstalledMotif
68 # define _MUseCat(a,b,c) a/**/c
70 # define _MUseCat(a,b,c) b/**/c
77 # define MTop $(TOP)/imports/motif
84 # define BuildDocDir $(BUILDINCROOT)/doc
87 # define BuildLocDir $(BUILDINCROOT)/localized
91 # define MotifDefines /**/
95 # define XmDefines /**/
98 /* To compile without SHAPE extension, set this to -DNO_SHAPE */
100 # define MwmDefines /**/
104 # define UilFlags /**/
108 # define TestDefines /**/
113 # define AutoDefines -DAUTOMATION
115 # define AutoDefines /**/
121 # define AutoIncludes -I$(AUTOSCRIPTSRC)
123 # define AutoIncludes /**/
128 # define PurifyFilesToClean *.pure_linkinfo *.pure_hardlink
130 # define PurifyFilesToClean
133 # define TestExtraFilesToClean *.Dat *.Scr PurifyFilesToClean
135 # define TestExtraFilesToClean *.Dat PurifyFilesToClean
139 # define UsrIncDir IncRoot
142 /* Place to install .uid files */
144 # define UidDir $(LIBDIR)/uid
147 #ifndef XmExtraLibraries
148 # define XmExtraLibraries /**/
152 # define YaccFlags /**/
155 #define MotifSharedRev 2.1
157 #ifndef BuildMotifConfig
158 # define BuildMotifConfig YES
160 #ifndef BuildMotifDemos
161 # define BuildMotifDemos YES
163 #ifndef BuildWMLTable
164 # define BuildWMLTable YES
168 # define SharedLibXm HasSharedLibraries
171 # define NormalLibXm (!SharedLibXm | ForceNormalLib)
174 # define DebugLibXm NO
177 # define ProfileLibXm NO
180 # define SharedXmRev MotifSharedRev
184 # define SharedLibMrm HasSharedLibraries
187 # define NormalLibMrm (!SharedLibMrm | ForceNormalLib)
190 # define DebugLibMrm NO
192 #ifndef ProfileLibMrm
193 # define ProfileLibMrm NO
196 # define SharedMrmRev MotifSharedRev
200 # define SharedLibUil HasSharedLibraries
203 # define NormalLibUil (!SharedLibUil | ForceNormalLib)
206 # define DebugLibUil NO
208 #ifndef ProfileLibUil
209 # define ProfileLibUil NO
212 # define SharedUilRev MotifSharedRev
215 #ifndef SharedLibACommon
216 # define SharedLibACommon HasSharedLibraries
218 #ifndef NormalLibACommon
219 # define NormalLibACommon (!SharedLibACommon | ForceNormalLib)
221 #ifndef DebugLibACommon
222 # define DebugLibACommon NO
224 #ifndef ProfileLibACommon
225 # define ProfileLibACommon NO
227 #ifndef SharedACommonRev
228 # define SharedACommonRev MotifSharedRev
231 #ifndef SharedLibScript
232 # define SharedLibScript HasSharedLibraries
234 #ifndef NormalLibScript
235 # define NormalLibScript (!SharedLibScript | ForceNormalLib)
237 #ifndef DebugLibScript
238 # define DebugLibScript NO
240 #ifndef ProfileLibScript
241 # define ProfileLibScript NO
243 #ifndef SharedScriptRev
244 # define SharedScriptRev MotifSharedRev
247 #ifndef SharedLibUtil
248 # define SharedLibUtil HasSharedLibraries
250 #ifndef NormalLibUtil
251 # define NormalLibUtil (!SharedLibUtil | ForceNormalLib)
254 # define DebugLibUtil NO
256 #ifndef ProfileLibUtil
257 # define ProfileLibUtil NO
259 #ifndef SharedUtilRev
260 # define SharedUtilRev MotifSharedRev
263 #ifndef SharedLibCreate
264 # define SharedLibCreate HasSharedLibraries
266 #ifndef NormalLibCreate
267 # define NormalLibCreate (!SharedLibCreate | ForceNormalLib)
269 #ifndef DebugLibCreate
270 # define DebugLibCreate NO
272 #ifndef ProfileLibCreate
273 # define ProfileLibCreate NO
275 #ifndef SharedCreateRev
276 # define SharedCreateRev MotifSharedRev
279 #ifndef SharedLibVisual
280 # define SharedLibVisual HasSharedLibraries
282 #ifndef NormalLibVisual
283 # define NormalLibVisual (!SharedLibVisual | ForceNormalLib)
285 #ifndef DebugLibVisual
286 # define DebugLibVisual NO
288 #ifndef ProfileLibVisual
289 # define ProfileLibVisual NO
291 #ifndef SharedVisualRev
292 # define SharedVisualRev MotifSharedRev
295 #ifndef SharedLibSynth
296 # define SharedLibSynth HasSharedLibraries
298 #ifndef NormalLibSynth
299 # define NormalLibSynth (!SharedLibSynth | ForceNormalLib)
301 #ifndef DebugLibSynth
302 # define DebugLibSynth NO
304 #ifndef ProfileLibSynth
305 # define ProfileLibSynth NO
307 #ifndef SharedSynthRev
308 # define SharedSynthRev MotifSharedRev
311 #ifndef SharedLibMCommon
312 # define SharedLibMCommon HasSharedLibraries
314 #ifndef NormalLibMCommon
315 # define NormalLibMCommon (!SharedLibMCommon | ForceNormalLib)
317 #ifndef DebugLibMCommon
318 # define DebugLibMCommon NO
320 #ifndef ProfileLibMCommon
321 # define ProfileLibMCommon NO
323 #ifndef SharedMCommonRev
324 # define SharedMCommonRev MotifSharedRev
328 # define XmClientLibs $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
330 #ifndef XmClientDepLibs
331 # define XmClientDepLibs $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
334 #ifndef MrmClientLibs
335 # define MrmClientLibs $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
337 #ifndef MrmClientDepLibs
338 # define MrmClientDepLibs $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
341 #ifndef UilClientLibs
342 # define UilClientLibs $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
344 #ifndef UilClientDepLibs
345 # define UilClientDepLibs $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
348 #ifndef TestClientLibs
349 # define TestClientLibs $(PURIFYLIBS) $(TESTCOMLIB) \
350 $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
351 $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
352 $(XMLIB) $(TESTGEOLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) \
353 $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
355 #ifndef TestUilClientLibs
356 # define TestUilClientLibs $(PURIFYLIBS) $(TESTUILCOMLIB) $(TESTCOMLIB) \
357 $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
358 $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
359 $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(TESTGEOLIB) \
360 $(XTOOLLIB) $(XPLIB) $(XLIB) $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
362 #ifndef TestClientDepLibs
363 # define TestClientDepLibs XmClientDepLibs
365 #ifndef TestUilClientDepLibs
366 # define TestUilClientDepLibs UilClientDepLibs
369 /* hardcoded default path. Contrary to the original duplicate of USRLIBDIR
370 in the Imakefiles. */
371 #ifndef VirtualBindingsPath
372 # define VirtualBindingsPath /usr/lib/Xm/bindings
376 TOP_MOTIF_INCLUDES = -I$(MINCLUDESRC)
377 #if defined(UseInstalled) || (UseInstalledMotif && UseInstalledX11)
378 UIL_INCLUDES = -I$(USRINCDIR)/uil
380 UIL_INCLUDES = -I$(UILSRC)
382 #ifdef BuildLibPathVar
383 MOTIFENVLIBDIR = MotifBuildLibPath
386 /* Message catalog usage */
388 # define GencatCmd gencat
391 # define GencatFlags /**/
393 #if defined(NoMessageCatalog)
394 # define BuildMessageCatalog NO
395 # define MessageCatalogDefines -DNO_MESSAGE_CATALOG
397 # define BuildMessageCatalog YES
398 # define MessageCatalogDefines /**/
400 #ifndef MessageCatalogRule
401 # if BuildMessageCatalog
402 # define MessageCatalogRule(prefix) Real_MessageCatalogRule(prefix)
404 # define MessageCatalogRule(prefix) Stub_MessageCatalogRule(prefix)
408 USRINCDIR = UsrIncDir
410 TESTSRC = $(MTOP)/tests
411 TESTLIB = $(TESTSRC)/lib
412 GENERALSRCLIB = $(TESTSRC)/General/lib
413 GENERALSRCBIN = $(TESTSRC)/General/bin
414 MANUALSRCLIB = $(TESTSRC)/Manual/lib
415 MANUALSRCBIN = $(TESTSRC)/Manual/bin
416 AUTOSRCLIB = $(TESTSRC)/Auto/lib
417 AUTOSRCBIN = $(TESTSRC)/Auto/bin
418 COMMONPP = $(GENERALSRCBIN)/Commonpp
419 GENRUN = $(GENERALSRCBIN)/Genrun
420 MANRUN = $(GENERALSRCBIN)/Manrun
422 TESTMALLOCSRC = $(GENERALSRCLIB)/Malloc
425 TESTGEOSRC = $(TESTLIB)/Geometry
428 TESTCOMSRC = $(AUTOSRCLIB)/Common
429 AUTOSCRIPTSRC = $(AUTOSRCLIB)/Script
430 AUTOSYNTHSRC = $(AUTOSRCLIB)/Synth
431 AUTOCREATESRC = $(AUTOSRCLIB)/Create
432 AUTOVISUALSRC = $(AUTOSRCLIB)/Visual
433 AUTOUTILSRC = $(AUTOSRCLIB)/Util
434 AUTOEXTRALIBS = -ll -ly -lm
436 TESTCOMSRC = $(MANUALSRCLIB)/Common
439 BUILDDOCDIR = BuildDocDir
440 BUILDLOCDIR = BuildLocDir
442 /* MTOOLKITSRC should be removed */
443 MTOOLKITSRC = $(TOOLKITSRC)
444 #if ImportMotif || UseInstalledMotif
445 MDOCSRC = $(MTOP)/doc
446 MLOCSRC = $(MTOP)/localized
448 MLOCSRC = $(MTOP)/exports/localized
450 #if defined(TopMotifInclude)
451 MINCLUDESRC = TopMotifInclude
452 #elif ImportMotif || UseInstalledMotif
453 MINCLUDESRC = $(MTOP)/include
455 MINCLUDESRC = $(MTOP)/exports/include
457 MLIBSRC = $(MTOP)/lib
458 MCLIENTSRC = $(MTOP)/clients
459 MDEMOSRC = $(MTOP)/demos
460 MWIDGETSRC = $(MLIBSRC)/Xm
461 MRESOURCESRC = $(MLIBSRC)/Mrm
462 UILSRC = $(MCLIENTSRC)/uil
463 #ifdef MotifProjectRoot
464 MPROJECTROOT = MotifProjectRoot
467 UIL = _MUse(uil,$(UILSRC)/uil)
468 DEPUIL = _MUseCat($(BINDIR),$(UILSRC),/uil)
470 XMEXTRA_LIBS = XmExtraLibraries
472 /* These libraries use UseInstalledMotif instead of UseInstalled. */
476 #define _UseCat _MUseCat
479 # define MBuildLibDir BuildLibDir
483 SharedLibReferences(XM,Xm,$(MWIDGETSRC),SOXMREV,SharedXmRev)
485 ProjectUnsharedLibReferences(XM,Xm,$(MWIDGETSRC),MBuildLibDir)
489 SharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),SOMRMREV,SharedMrmRev)
491 ProjectUnsharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),MBuildLibDir)
495 SharedLibReferences(UIL,Uil,$(UILSRC),SOUILREV,SharedUilRev)
497 ProjectUnsharedLibReferences(UIL,Uil,$(UILSRC),MBuildLibDir)
501 ProjectUnsharedLibReferences(TESTGEO,XtGeo,$(TESTGEOSRC),MBuildLibDir)
506 # if SharedLibACommon
507 SharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),SOACOMMONREV,SharedACommonRev)
509 ProjectUnsharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),MBuildLibDir)
512 TESTUILCOMLIB = $(TESTCOMSRC)/libACommonUil.a
515 SharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),SOSCRIPTREV,SharedScriptRev)
517 ProjectUnsharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),MBuildLibDir)
521 SharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),SOSYNTHREV,SharedSynthRev)
523 ProjectUnsharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),MBuildLibDir)
527 SharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),SOCREATEREV,SharedCreateRev)
529 ProjectUnsharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),MBuildLibDir)
533 SharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),SOVISUALREV,SharedVisualRev)
535 ProjectUnsharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),MBuildLibDir)
539 SharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),SOUTILREV,SharedUtilRev)
541 ProjectUnsharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),MBuildLibDir)
546 # if SharedLibMCommon
547 SharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),SOMCOMMONREV,SharedMCommonRev)
549 ProjectUnsharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),MBuildLibDir)
551 TESTUILCOMLIB = $(TESTCOMSRC)/libMCommonUil.a
553 #endif /* Automation */
556 /* Revert to the normal library rules. */
560 #define _UseCat _XUseCat
564 PURIFYLIBS = $(PURIFYHOME)/purify_stubs.a
566 LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
567 LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
568 LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
569 LINTUILLIB = $(UILSRC)/llib-lUil.ln
571 YACCFLAGS = YaccFlags
573 GENCATFLAGS = GencatFlags
574 GENCAT = GencatCmd $(GENCATFLAGS)
575 MKCATTOOL = $(TOP)/programs/localized/util/mkcatdefs
577 RM_CMD = $(RM) FilesToClean ExtraFilesToClean TestExtraFilesToClean
579 #if NeedDefaultDepLibs
580 # if HasSharedLibraries || defined(UseInstalled)
581 DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
583 DEPLIBS = $(LOCAL_LIBRARIES)
585 DEPLIBS1 = $(DEPLIBS)
586 DEPLIBS2 = $(DEPLIBS)
587 DEPLIBS3 = $(DEPLIBS)
588 #endif /* NeedDefaultDepLibs */