4 * Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, 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 $XConsortium: Motif.tmpl /main/2 1996/12/04 10:12:55 swick $
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
158 # define SharedLibXm HasSharedLibraries
161 # define NormalLibXm (!SharedLibXm | ForceNormalLib)
164 # define DebugLibXm NO
167 # define ProfileLibXm NO
170 # define SharedXmRev MotifSharedRev
174 # define SharedLibMrm HasSharedLibraries
177 # define NormalLibMrm (!SharedLibMrm | ForceNormalLib)
180 # define DebugLibMrm NO
182 #ifndef ProfileLibMrm
183 # define ProfileLibMrm NO
186 # define SharedMrmRev MotifSharedRev
190 # define SharedLibUil HasSharedLibraries
193 # define NormalLibUil (!SharedLibUil | ForceNormalLib)
196 # define DebugLibUil NO
198 #ifndef ProfileLibUil
199 # define ProfileLibUil NO
202 # define SharedUilRev MotifSharedRev
205 #ifndef SharedLibACommon
206 # define SharedLibACommon HasSharedLibraries
208 #ifndef NormalLibACommon
209 # define NormalLibACommon (!SharedLibACommon | ForceNormalLib)
211 #ifndef DebugLibACommon
212 # define DebugLibACommon NO
214 #ifndef ProfileLibACommon
215 # define ProfileLibACommon NO
217 #ifndef SharedACommonRev
218 # define SharedACommonRev MotifSharedRev
221 #ifndef SharedLibScript
222 # define SharedLibScript HasSharedLibraries
224 #ifndef NormalLibScript
225 # define NormalLibScript (!SharedLibScript | ForceNormalLib)
227 #ifndef DebugLibScript
228 # define DebugLibScript NO
230 #ifndef ProfileLibScript
231 # define ProfileLibScript NO
233 #ifndef SharedScriptRev
234 # define SharedScriptRev MotifSharedRev
237 #ifndef SharedLibUtil
238 # define SharedLibUtil HasSharedLibraries
240 #ifndef NormalLibUtil
241 # define NormalLibUtil (!SharedLibUtil | ForceNormalLib)
244 # define DebugLibUtil NO
246 #ifndef ProfileLibUtil
247 # define ProfileLibUtil NO
249 #ifndef SharedUtilRev
250 # define SharedUtilRev MotifSharedRev
253 #ifndef SharedLibCreate
254 # define SharedLibCreate HasSharedLibraries
256 #ifndef NormalLibCreate
257 # define NormalLibCreate (!SharedLibCreate | ForceNormalLib)
259 #ifndef DebugLibCreate
260 # define DebugLibCreate NO
262 #ifndef ProfileLibCreate
263 # define ProfileLibCreate NO
265 #ifndef SharedCreateRev
266 # define SharedCreateRev MotifSharedRev
269 #ifndef SharedLibVisual
270 # define SharedLibVisual HasSharedLibraries
272 #ifndef NormalLibVisual
273 # define NormalLibVisual (!SharedLibVisual | ForceNormalLib)
275 #ifndef DebugLibVisual
276 # define DebugLibVisual NO
278 #ifndef ProfileLibVisual
279 # define ProfileLibVisual NO
281 #ifndef SharedVisualRev
282 # define SharedVisualRev MotifSharedRev
285 #ifndef SharedLibSynth
286 # define SharedLibSynth HasSharedLibraries
288 #ifndef NormalLibSynth
289 # define NormalLibSynth (!SharedLibSynth | ForceNormalLib)
291 #ifndef DebugLibSynth
292 # define DebugLibSynth NO
294 #ifndef ProfileLibSynth
295 # define ProfileLibSynth NO
297 #ifndef SharedSynthRev
298 # define SharedSynthRev MotifSharedRev
301 #ifndef SharedLibMCommon
302 # define SharedLibMCommon HasSharedLibraries
304 #ifndef NormalLibMCommon
305 # define NormalLibMCommon (!SharedLibMCommon | ForceNormalLib)
307 #ifndef DebugLibMCommon
308 # define DebugLibMCommon NO
310 #ifndef ProfileLibMCommon
311 # define ProfileLibMCommon NO
313 #ifndef SharedMCommonRev
314 # define SharedMCommonRev MotifSharedRev
318 # define XmClientLibs $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
320 #ifndef XmClientDepLibs
321 # define XmClientDepLibs $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
324 #ifndef MrmClientLibs
325 # define MrmClientLibs $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
327 #ifndef MrmClientDepLibs
328 # define MrmClientDepLibs $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
331 #ifndef UilClientLibs
332 # define UilClientLibs $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
334 #ifndef UilClientDepLibs
335 # define UilClientDepLibs $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
338 #ifndef TestClientLibs
339 # define TestClientLibs $(PURIFYLIBS) $(TESTCOMLIB) \
340 $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
341 $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
342 $(XMLIB) $(TESTGEOLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) \
343 $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
345 #ifndef TestUilClientLibs
346 # define TestUilClientLibs $(PURIFYLIBS) $(TESTUILCOMLIB) $(TESTCOMLIB) \
347 $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
348 $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
349 $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(TESTGEOLIB) \
350 $(XTOOLLIB) $(XPLIB) $(XLIB) $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
352 #ifndef TestClientDepLibs
353 # define TestClientDepLibs XmClientDepLibs
355 #ifndef TestUilClientDepLibs
356 # define TestUilClientDepLibs UilClientDepLibs
361 TOP_MOTIF_INCLUDES = -I$(MINCLUDESRC)
362 #if defined(UseInstalled) || (UseInstalledMotif && UseInstalledX11)
363 UIL_INCLUDES = -I$(USRINCDIR)/uil
365 UIL_INCLUDES = -I$(UILSRC)
367 #ifdef BuildLibPathVar
368 MOTIFENVLIBDIR = MotifBuildLibPath
371 /* Message catalog usage */
373 # define GencatCmd gencat
376 # define GencatFlags /**/
378 #if defined(NoMessageCatalog)
379 # define BuildMessageCatalog NO
380 # define MessageCatalogDefines -DNO_MESSAGE_CATALOG
382 # define BuildMessageCatalog YES
383 # define MessageCatalogDefines /**/
385 #ifndef MessageCatalogRule
386 # if BuildMessageCatalog
387 # define MessageCatalogRule(prefix) Real_MessageCatalogRule(prefix)
389 # define MessageCatalogRule(prefix) Stub_MessageCatalogRule(prefix)
393 USRINCDIR = UsrIncDir
395 TESTSRC = $(MTOP)/tests
396 TESTLIB = $(TESTSRC)/lib
397 GENERALSRCLIB = $(TESTSRC)/General/lib
398 GENERALSRCBIN = $(TESTSRC)/General/bin
399 MANUALSRCLIB = $(TESTSRC)/Manual/lib
400 MANUALSRCBIN = $(TESTSRC)/Manual/bin
401 AUTOSRCLIB = $(TESTSRC)/Auto/lib
402 AUTOSRCBIN = $(TESTSRC)/Auto/bin
403 COMMONPP = $(GENERALSRCBIN)/Commonpp
404 GENRUN = $(GENERALSRCBIN)/Genrun
405 MANRUN = $(GENERALSRCBIN)/Manrun
407 TESTMALLOCSRC = $(GENERALSRCLIB)/Malloc
410 TESTGEOSRC = $(TESTLIB)/Geometry
413 TESTCOMSRC = $(AUTOSRCLIB)/Common
414 AUTOSCRIPTSRC = $(AUTOSRCLIB)/Script
415 AUTOSYNTHSRC = $(AUTOSRCLIB)/Synth
416 AUTOCREATESRC = $(AUTOSRCLIB)/Create
417 AUTOVISUALSRC = $(AUTOSRCLIB)/Visual
418 AUTOUTILSRC = $(AUTOSRCLIB)/Util
419 AUTOEXTRALIBS = -ll -ly -lm
421 TESTCOMSRC = $(MANUALSRCLIB)/Common
424 BUILDDOCDIR = BuildDocDir
425 BUILDLOCDIR = BuildLocDir
427 /* MTOOLKITSRC should be removed */
428 MTOOLKITSRC = $(TOOLKITSRC)
429 #if ImportMotif || UseInstalledMotif
430 MINCLUDESRC = $(MTOP)/include
431 MDOCSRC = $(MTOP)/doc
432 MLOCSRC = $(MTOP)/localized
434 MINCLUDESRC = $(MTOP)/exports/include
435 MLOCSRC = $(MTOP)/exports/localized
437 MLIBSRC = $(MTOP)/lib
438 MCLIENTSRC = $(MTOP)/clients
439 MDEMOSRC = $(MTOP)/demos
440 MWIDGETSRC = $(MLIBSRC)/Xm
441 MRESOURCESRC = $(MLIBSRC)/Mrm
442 UILSRC = $(MCLIENTSRC)/uil
443 #ifdef MotifProjectRoot
444 MPROJECTROOT = MotifProjectRoot
447 UIL = _MUse(uil,$(UILSRC)/uil)
448 DEPUIL = _MUseCat($(BINDIR),$(UILSRC),/uil)
450 XMEXTRA_LIBS = XmExtraLibraries
452 /* These libraries use UseInstalledMotif instead of UseInstalled. */
456 #define _UseCat _MUseCat
459 # define MBuildLibDir BuildLibDir
463 SharedLibReferences(XM,Xm,$(MWIDGETSRC),SOXMREV,SharedXmRev)
465 ProjectUnsharedLibReferences(XM,Xm,$(MWIDGETSRC),MBuildLibDir)
469 SharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),SOMRMREV,SharedMrmRev)
471 ProjectUnsharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),MBuildLibDir)
475 SharedLibReferences(UIL,Uil,$(UILSRC),SOUILREV,SharedUilRev)
477 ProjectUnsharedLibReferences(UIL,Uil,$(UILSRC),MBuildLibDir)
481 ProjectUnsharedLibReferences(TESTGEO,XtGeo,$(TESTGEOSRC),MBuildLibDir)
486 # if SharedLibACommon
487 SharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),SOACOMMONREV,SharedACommonRev)
489 ProjectUnsharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),MBuildLibDir)
492 TESTUILCOMLIB = $(TESTCOMSRC)/libACommonUil.a
495 SharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),SOSCRIPTREV,SharedScriptRev)
497 ProjectUnsharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),MBuildLibDir)
501 SharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),SOSYNTHREV,SharedSynthRev)
503 ProjectUnsharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),MBuildLibDir)
507 SharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),SOCREATEREV,SharedCreateRev)
509 ProjectUnsharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),MBuildLibDir)
513 SharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),SOVISUALREV,SharedVisualRev)
515 ProjectUnsharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),MBuildLibDir)
519 SharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),SOUTILREV,SharedUtilRev)
521 ProjectUnsharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),MBuildLibDir)
526 # if SharedLibMCommon
527 SharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),SOMCOMMONREV,SharedMCommonRev)
529 ProjectUnsharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),MBuildLibDir)
531 TESTUILCOMLIB = $(TESTCOMSRC)/libMCommonUil.a
533 #endif /* Automation */
536 /* Revert to the normal library rules. */
540 #define _UseCat _XUseCat
544 PURIFYLIBS = $(PURIFYHOME)/purify_stubs.a
546 LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
547 LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
548 LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
549 LINTUILLIB = $(UILSRC)/llib-lUil.ln
551 YACCFLAGS = YaccFlags
553 GENCATFLAGS = GencatFlags
554 GENCAT = GencatCmd $(GENCATFLAGS)
555 MKCATTOOL = $(MLOCSRC)/util/mkcatdefs
557 RM_CMD = $(RM) FilesToClean ExtraFilesToClean TestExtraFilesToClean
559 #if NeedDefaultDepLibs
560 # if HasSharedLibraries || defined(UseInstalled)
561 DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
563 DEPLIBS = $(LOCAL_LIBRARIES)
565 DEPLIBS1 = $(DEPLIBS)
566 DEPLIBS2 = $(DEPLIBS)
567 DEPLIBS3 = $(DEPLIBS)
568 #endif /* NeedDefaultDepLibs */