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 (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
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
76 # if ImportMotif || UseInstalledMotif
77 # define MTop $(TOP)/imports/motif
84 # define BuildDocDir $(BUILDINCROOT)/doc
87 # define BuildLocDir $(BUILDINCROOT)/localized
91 # define MotifDefines /**/
95 # define XmDefines /**/
99 # define MwmDefines /**/
103 # define UilFlags /**/
107 # define TestDefines /**/
112 # define AutoDefines -DAUTOMATION
114 # define AutoDefines /**/
120 # define AutoIncludes -I$(AUTOSCRIPTSRC)
122 # define AutoIncludes /**/
127 # define PurifyFilesToClean *.pure_linkinfo *.pure_hardlink
129 # define PurifyFilesToClean
132 # define TestExtraFilesToClean *.Dat *.Scr PurifyFilesToClean
134 # define TestExtraFilesToClean *.Dat PurifyFilesToClean
138 # define UsrIncDir IncRoot
141 /* Place to install .uid files */
143 # define UidDir $(LIBDIR)/uid
146 #ifndef XmExtraLibraries
147 # define XmExtraLibraries /**/
151 # define YaccFlags /**/
154 #define MotifSharedRev 2.1
156 #ifndef BuildMotifConfig
157 # define BuildMotifConfig YES
159 #ifndef BuildMotifDemos
160 # define BuildMotifDemos YES
162 #ifndef BuildWMLTable
163 # define BuildWMLTable YES
167 # define SharedLibXm HasSharedLibraries
170 # define NormalLibXm (!SharedLibXm | ForceNormalLib)
173 # define DebugLibXm NO
176 # define ProfileLibXm NO
179 # define SharedXmRev MotifSharedRev
183 # define SharedLibMrm HasSharedLibraries
186 # define NormalLibMrm (!SharedLibMrm | ForceNormalLib)
189 # define DebugLibMrm NO
191 #ifndef ProfileLibMrm
192 # define ProfileLibMrm NO
195 # define SharedMrmRev MotifSharedRev
199 # define SharedLibUil HasSharedLibraries
202 # define NormalLibUil (!SharedLibUil | ForceNormalLib)
205 # define DebugLibUil NO
207 #ifndef ProfileLibUil
208 # define ProfileLibUil NO
211 # define SharedUilRev MotifSharedRev
214 #ifndef SharedLibACommon
215 # define SharedLibACommon HasSharedLibraries
217 #ifndef NormalLibACommon
218 # define NormalLibACommon (!SharedLibACommon | ForceNormalLib)
220 #ifndef DebugLibACommon
221 # define DebugLibACommon NO
223 #ifndef ProfileLibACommon
224 # define ProfileLibACommon NO
226 #ifndef SharedACommonRev
227 # define SharedACommonRev MotifSharedRev
230 #ifndef SharedLibScript
231 # define SharedLibScript HasSharedLibraries
233 #ifndef NormalLibScript
234 # define NormalLibScript (!SharedLibScript | ForceNormalLib)
236 #ifndef DebugLibScript
237 # define DebugLibScript NO
239 #ifndef ProfileLibScript
240 # define ProfileLibScript NO
242 #ifndef SharedScriptRev
243 # define SharedScriptRev MotifSharedRev
246 #ifndef SharedLibUtil
247 # define SharedLibUtil HasSharedLibraries
249 #ifndef NormalLibUtil
250 # define NormalLibUtil (!SharedLibUtil | ForceNormalLib)
253 # define DebugLibUtil NO
255 #ifndef ProfileLibUtil
256 # define ProfileLibUtil NO
258 #ifndef SharedUtilRev
259 # define SharedUtilRev MotifSharedRev
262 #ifndef SharedLibCreate
263 # define SharedLibCreate HasSharedLibraries
265 #ifndef NormalLibCreate
266 # define NormalLibCreate (!SharedLibCreate | ForceNormalLib)
268 #ifndef DebugLibCreate
269 # define DebugLibCreate NO
271 #ifndef ProfileLibCreate
272 # define ProfileLibCreate NO
274 #ifndef SharedCreateRev
275 # define SharedCreateRev MotifSharedRev
278 #ifndef SharedLibVisual
279 # define SharedLibVisual HasSharedLibraries
281 #ifndef NormalLibVisual
282 # define NormalLibVisual (!SharedLibVisual | ForceNormalLib)
284 #ifndef DebugLibVisual
285 # define DebugLibVisual NO
287 #ifndef ProfileLibVisual
288 # define ProfileLibVisual NO
290 #ifndef SharedVisualRev
291 # define SharedVisualRev MotifSharedRev
294 #ifndef SharedLibSynth
295 # define SharedLibSynth HasSharedLibraries
297 #ifndef NormalLibSynth
298 # define NormalLibSynth (!SharedLibSynth | ForceNormalLib)
300 #ifndef DebugLibSynth
301 # define DebugLibSynth NO
303 #ifndef ProfileLibSynth
304 # define ProfileLibSynth NO
306 #ifndef SharedSynthRev
307 # define SharedSynthRev MotifSharedRev
310 #ifndef SharedLibMCommon
311 # define SharedLibMCommon HasSharedLibraries
313 #ifndef NormalLibMCommon
314 # define NormalLibMCommon (!SharedLibMCommon | ForceNormalLib)
316 #ifndef DebugLibMCommon
317 # define DebugLibMCommon NO
319 #ifndef ProfileLibMCommon
320 # define ProfileLibMCommon NO
322 #ifndef SharedMCommonRev
323 # define SharedMCommonRev MotifSharedRev
327 # define XmClientLibs $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
329 #ifndef XmClientDepLibs
330 # define XmClientDepLibs $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
333 #ifndef MrmClientLibs
334 # define MrmClientLibs $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
336 #ifndef MrmClientDepLibs
337 # define MrmClientDepLibs $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
340 #ifndef UilClientLibs
341 # define UilClientLibs $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
343 #ifndef UilClientDepLibs
344 # define UilClientDepLibs $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
347 #ifndef TestClientLibs
348 # define TestClientLibs $(PURIFYLIBS) $(TESTCOMLIB) \
349 $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
350 $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
351 $(XMLIB) $(TESTGEOLIB) $(XTOOLLIB) $(XLIB) \
352 $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
354 #ifndef TestUilClientLibs
355 # define TestUilClientLibs $(PURIFYLIBS) $(TESTUILCOMLIB) $(TESTCOMLIB) \
356 $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
357 $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
358 $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(TESTGEOLIB) \
359 $(XTOOLLIB) $(XLIB) $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
361 #ifndef TestClientDepLibs
362 # define TestClientDepLibs XmClientDepLibs
364 #ifndef TestUilClientDepLibs
365 # define TestUilClientDepLibs UilClientDepLibs
368 /* hardcoded default path. Contrary to the original duplicate of USRLIBDIR
369 in the Imakefiles. */
370 #ifndef VirtualBindingsPath
371 # define VirtualBindingsPath /usr/lib/Xm/bindings
375 TOP_MOTIF_INCLUDES = -I$(MINCLUDESRC)
376 #if defined(UseInstalled) || (UseInstalledMotif && UseInstalledX11)
377 UIL_INCLUDES = -I$(USRINCDIR)/uil
379 UIL_INCLUDES = -I$(UILSRC)
381 #ifdef BuildLibPathVar
382 MOTIFENVLIBDIR = MotifBuildLibPath
385 /* Message catalog usage */
387 # define GencatCmd gencat
390 # define GencatFlags /**/
392 #if defined(NoMessageCatalog)
393 # define BuildMessageCatalog NO
394 # define MessageCatalogDefines -DNO_MESSAGE_CATALOG
396 # define BuildMessageCatalog YES
397 # define MessageCatalogDefines /**/
399 #ifndef MessageCatalogRule
400 # if BuildMessageCatalog
401 # define MessageCatalogRule(prefix) Real_MessageCatalogRule(prefix)
403 # define MessageCatalogRule(prefix) Stub_MessageCatalogRule(prefix)
407 USRINCDIR = UsrIncDir
409 TESTSRC = $(MTOP)/tests
410 TESTLIB = $(TESTSRC)/lib
411 GENERALSRCLIB = $(TESTSRC)/General/lib
412 GENERALSRCBIN = $(TESTSRC)/General/bin
413 MANUALSRCLIB = $(TESTSRC)/Manual/lib
414 MANUALSRCBIN = $(TESTSRC)/Manual/bin
415 AUTOSRCLIB = $(TESTSRC)/Auto/lib
416 AUTOSRCBIN = $(TESTSRC)/Auto/bin
417 COMMONPP = $(GENERALSRCBIN)/Commonpp
418 GENRUN = $(GENERALSRCBIN)/Genrun
419 MANRUN = $(GENERALSRCBIN)/Manrun
421 TESTMALLOCSRC = $(GENERALSRCLIB)/Malloc
424 TESTGEOSRC = $(TESTLIB)/Geometry
427 TESTCOMSRC = $(AUTOSRCLIB)/Common
428 AUTOSCRIPTSRC = $(AUTOSRCLIB)/Script
429 AUTOSYNTHSRC = $(AUTOSRCLIB)/Synth
430 AUTOCREATESRC = $(AUTOSRCLIB)/Create
431 AUTOVISUALSRC = $(AUTOSRCLIB)/Visual
432 AUTOUTILSRC = $(AUTOSRCLIB)/Util
433 AUTOEXTRALIBS = -ll -ly -lm
435 TESTCOMSRC = $(MANUALSRCLIB)/Common
438 BUILDDOCDIR = BuildDocDir
439 BUILDLOCDIR = BuildLocDir
441 /* MTOOLKITSRC should be removed */
442 MTOOLKITSRC = $(TOOLKITSRC)
443 #if ImportMotif || UseInstalledMotif
444 MDOCSRC = $(MTOP)/doc
445 MLOCSRC = $(MTOP)/localized
447 MLOCSRC = $(MTOP)/exports/localized
449 #if defined(TopMotifInclude)
450 MINCLUDESRC = TopMotifInclude
451 #elif ImportMotif || UseInstalledMotif
452 MINCLUDESRC = $(MTOP)/include
454 MINCLUDESRC = $(MTOP)/exports/include
456 MLIBSRC = $(MTOP)/lib
457 MCLIENTSRC = $(MTOP)/clients
458 MDEMOSRC = $(MTOP)/demos
459 MWIDGETSRC = $(MLIBSRC)/Xm
460 MRESOURCESRC = $(MLIBSRC)/Mrm
461 UILSRC = $(MCLIENTSRC)/uil
462 #ifdef MotifProjectRoot
463 MPROJECTROOT = MotifProjectRoot
466 UIL = _MUse(uil,$(UILSRC)/uil)
467 DEPUIL = _MUseCat($(BINDIR),$(UILSRC),/uil)
469 XMEXTRA_LIBS = XmExtraLibraries
471 /* These libraries use UseInstalledMotif instead of UseInstalled. */
475 #define _UseCat _MUseCat
478 # define MBuildLibDir BuildLibDir
482 SharedLibReferences(XM,Xm,$(MWIDGETSRC),SOXMREV,SharedXmRev)
484 ProjectUnsharedLibReferences(XM,Xm,$(MWIDGETSRC),MBuildLibDir)
488 SharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),SOMRMREV,SharedMrmRev)
490 ProjectUnsharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),MBuildLibDir)
494 SharedLibReferences(UIL,Uil,$(UILSRC),SOUILREV,SharedUilRev)
496 ProjectUnsharedLibReferences(UIL,Uil,$(UILSRC),MBuildLibDir)
500 ProjectUnsharedLibReferences(TESTGEO,XtGeo,$(TESTGEOSRC),MBuildLibDir)
505 # if SharedLibACommon
506 SharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),SOACOMMONREV,SharedACommonRev)
508 ProjectUnsharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),MBuildLibDir)
511 TESTUILCOMLIB = $(TESTCOMSRC)/libACommonUil.a
514 SharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),SOSCRIPTREV,SharedScriptRev)
516 ProjectUnsharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),MBuildLibDir)
520 SharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),SOSYNTHREV,SharedSynthRev)
522 ProjectUnsharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),MBuildLibDir)
526 SharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),SOCREATEREV,SharedCreateRev)
528 ProjectUnsharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),MBuildLibDir)
532 SharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),SOVISUALREV,SharedVisualRev)
534 ProjectUnsharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),MBuildLibDir)
538 SharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),SOUTILREV,SharedUtilRev)
540 ProjectUnsharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),MBuildLibDir)
545 # if SharedLibMCommon
546 SharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),SOMCOMMONREV,SharedMCommonRev)
548 ProjectUnsharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),MBuildLibDir)
550 TESTUILCOMLIB = $(TESTCOMSRC)/libMCommonUil.a
552 #endif /* Automation */
555 /* Revert to the normal library rules. */
559 #define _UseCat _XUseCat
563 PURIFYLIBS = $(PURIFYHOME)/purify_stubs.a
565 LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
566 LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
567 LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
568 LINTUILLIB = $(UILSRC)/llib-lUil.ln
570 YACCFLAGS = YaccFlags
572 GENCATFLAGS = GencatFlags
573 GENCAT = GencatCmd $(GENCATFLAGS)
574 MKCATTOOL = $(TOP)/programs/localized/util/mkcatdefs
576 RM_CMD = $(RM) FilesToClean ExtraFilesToClean TestExtraFilesToClean
578 #if NeedDefaultDepLibs
579 # if HasSharedLibraries || defined(UseInstalled)
580 DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
582 DEPLIBS = $(LOCAL_LIBRARIES)
584 DEPLIBS1 = $(DEPLIBS)
585 DEPLIBS2 = $(DEPLIBS)
586 DEPLIBS3 = $(DEPLIBS)
587 #endif /* NeedDefaultDepLibs */
589 /* check for existence of Dtinfo Motif Documents */
590 #if defined(LinuxArchitecture)
591 MOTIF_DOC = $(shell if test -f $(MDOCSRC)/C/guides/bookcase.bc; then echo -D_MOTIFDOC_; fi)
592 #elif defined(SunArchitecture)
593 MOTIF_DOC :sh = if test -f ../imports/motif/doc/C/guides/bookcase.bc; then echo -D_MOTIFDOC_; else echo; fi
594 #elif defined(BSDArchitecture)
595 MOTIF_DOC != if test -f $(MDOCSRC)/C/guides/bookcase.bc; then echo -D_MOTIFDOC_; else echo; fi
597 MOTIF_DOC = -D_MOTIFDOC_