123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599 |
- /*
- * @OSF_COPYRIGHT@
- * COPYRIGHT NOTICE
- * Copyright (c) 1990, 1991, 1992, 1993, 1998 The Open Group, Inc.
- * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
- * the full copyright text.
- *
- * (c) Copyright 1996 Digital Equipment Corporation.
- * (c) Copyright 1996 Hewlett-Packard Company.
- * (c) Copyright 1996 International Business Machines Corp.
- * (c) Copyright 1996 Sun Microsystems, Inc.
- * (c) Copyright 1996 Novell, Inc.
- * (c) Copyright 1996 FUJITSU LIMITED.
- * (c) Copyright 1996 Hitachi.
- */
- XCOMM $TOG: Motif.tmpl /main/6 1999/05/19 17:00:05 mgreess $
- /* Include the X11 project template file. */
- #include <X11.tmpl>
- #ifdef AUTOMATION
- # ifndef Automation
- # define Automation YES
- # endif
- #else
- # define NO_AUTOMATION
- #endif
- #ifdef USE_VISTACC
- # ifndef UseVista
- # define UseVista
- # endif
- # ifndef CATCMD
- # define CATCMD cat
- # endif
- #endif
- #ifdef USE_PURIFY
- # ifndef UsePurify
- # define UsePurify
- # endif
- #endif
- #ifdef DEBUG_GEOMETRY
- # ifndef DebugGeometry
- # define DebugGeometry YES
- # endif
- #endif
- #ifndef _MUse
- # if UseInstalledMotif
- # define _MUse(a,b) a
- # else
- # define _MUse(a,b) b
- # endif
- #endif
- #ifndef _MUseCat
- # if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
- # if UseInstalledMotif
- # define _MUseCat(a,b,c) a##c
- # else
- # define _MUseCat(a,b,c) b##c
- # endif
- # else
- # if UseInstalledMotif
- # define _MUseCat(a,b,c) a/**/c
- # else
- # define _MUseCat(a,b,c) b/**/c
- # endif
- # endif
- #endif
- #ifndef MTop
- # if ImportMotif || UseInstalledMotif
- # define MTop $(TOP)/imports/motif
- # else
- # define MTop $(TOP)
- # endif
- #endif
- #ifndef BuildDocDir
- # define BuildDocDir $(BUILDINCROOT)/doc
- #endif
- #ifndef BuildLocDir
- # define BuildLocDir $(BUILDINCROOT)/localized
- #endif
- #ifndef MotifDefines
- # define MotifDefines /**/
- #endif
- #ifndef XmDefines
- # define XmDefines /**/
- #endif
- /* To compile without SHAPE extension, set this to -DNO_SHAPE */
- #ifndef MwmDefines
- # define MwmDefines /**/
- #endif
- #ifndef UilFlags
- # define UilFlags /**/
- #endif
- #ifndef TestDefines
- # define TestDefines /**/
- #endif
- #ifndef AutoDefines
- # if Automation
- # define AutoDefines -DAUTOMATION
- # else
- # define AutoDefines /**/
- # endif
- #endif
- #ifndef AutoIncludes
- # if Automation
- # define AutoIncludes -I$(AUTOSCRIPTSRC)
- # else
- # define AutoIncludes /**/
- # endif
- #endif
- #ifdef UsePurify
- # define PurifyFilesToClean *.pure_linkinfo *.pure_hardlink
- #else
- # define PurifyFilesToClean
- #endif
- #if Automation
- # define TestExtraFilesToClean *.Dat *.Scr PurifyFilesToClean
- #else
- # define TestExtraFilesToClean *.Dat PurifyFilesToClean
- #endif
- #ifndef UsrIncDir
- # define UsrIncDir IncRoot
- #endif
- /* Place to install .uid files */
- #ifndef UidDir
- # define UidDir $(LIBDIR)/uid
- #endif
- #ifndef XmExtraLibraries
- # define XmExtraLibraries /**/
- #endif
- #ifndef YaccFlags
- # define YaccFlags /**/
- #endif
- #define MotifSharedRev 2.1
- #ifndef BuildMotifConfig
- # define BuildMotifConfig YES
- #endif
- #ifndef BuildMotifDemos
- # define BuildMotifDemos YES
- #endif
- #ifndef BuildWMLTable
- # define BuildWMLTable YES
- #endif
- #ifndef SharedLibXm
- # define SharedLibXm HasSharedLibraries
- #endif
- #ifndef NormalLibXm
- # define NormalLibXm (!SharedLibXm | ForceNormalLib)
- #endif
- #ifndef DebugLibXm
- # define DebugLibXm NO
- #endif
- #ifndef ProfileLibXm
- # define ProfileLibXm NO
- #endif
- #ifndef SharedXmRev
- # define SharedXmRev MotifSharedRev
- #endif
- #ifndef SharedLibMrm
- # define SharedLibMrm HasSharedLibraries
- #endif
- #ifndef NormalLibMrm
- # define NormalLibMrm (!SharedLibMrm | ForceNormalLib)
- #endif
- #ifndef DebugLibMrm
- # define DebugLibMrm NO
- #endif
- #ifndef ProfileLibMrm
- # define ProfileLibMrm NO
- #endif
- #ifndef SharedMrmRev
- # define SharedMrmRev MotifSharedRev
- #endif
- #ifndef SharedLibUil
- # define SharedLibUil HasSharedLibraries
- #endif
- #ifndef NormalLibUil
- # define NormalLibUil (!SharedLibUil | ForceNormalLib)
- #endif
- #ifndef DebugLibUil
- # define DebugLibUil NO
- #endif
- #ifndef ProfileLibUil
- # define ProfileLibUil NO
- #endif
- #ifndef SharedUilRev
- # define SharedUilRev MotifSharedRev
- #endif
- #ifndef SharedLibACommon
- # define SharedLibACommon HasSharedLibraries
- #endif
- #ifndef NormalLibACommon
- # define NormalLibACommon (!SharedLibACommon | ForceNormalLib)
- #endif
- #ifndef DebugLibACommon
- # define DebugLibACommon NO
- #endif
- #ifndef ProfileLibACommon
- # define ProfileLibACommon NO
- #endif
- #ifndef SharedACommonRev
- # define SharedACommonRev MotifSharedRev
- #endif
- #ifndef SharedLibScript
- # define SharedLibScript HasSharedLibraries
- #endif
- #ifndef NormalLibScript
- # define NormalLibScript (!SharedLibScript | ForceNormalLib)
- #endif
- #ifndef DebugLibScript
- # define DebugLibScript NO
- #endif
- #ifndef ProfileLibScript
- # define ProfileLibScript NO
- #endif
- #ifndef SharedScriptRev
- # define SharedScriptRev MotifSharedRev
- #endif
- #ifndef SharedLibUtil
- # define SharedLibUtil HasSharedLibraries
- #endif
- #ifndef NormalLibUtil
- # define NormalLibUtil (!SharedLibUtil | ForceNormalLib)
- #endif
- #ifndef DebugLibUtil
- # define DebugLibUtil NO
- #endif
- #ifndef ProfileLibUtil
- # define ProfileLibUtil NO
- #endif
- #ifndef SharedUtilRev
- # define SharedUtilRev MotifSharedRev
- #endif
- #ifndef SharedLibCreate
- # define SharedLibCreate HasSharedLibraries
- #endif
- #ifndef NormalLibCreate
- # define NormalLibCreate (!SharedLibCreate | ForceNormalLib)
- #endif
- #ifndef DebugLibCreate
- # define DebugLibCreate NO
- #endif
- #ifndef ProfileLibCreate
- # define ProfileLibCreate NO
- #endif
- #ifndef SharedCreateRev
- # define SharedCreateRev MotifSharedRev
- #endif
- #ifndef SharedLibVisual
- # define SharedLibVisual HasSharedLibraries
- #endif
- #ifndef NormalLibVisual
- # define NormalLibVisual (!SharedLibVisual | ForceNormalLib)
- #endif
- #ifndef DebugLibVisual
- # define DebugLibVisual NO
- #endif
- #ifndef ProfileLibVisual
- # define ProfileLibVisual NO
- #endif
- #ifndef SharedVisualRev
- # define SharedVisualRev MotifSharedRev
- #endif
- #ifndef SharedLibSynth
- # define SharedLibSynth HasSharedLibraries
- #endif
- #ifndef NormalLibSynth
- # define NormalLibSynth (!SharedLibSynth | ForceNormalLib)
- #endif
- #ifndef DebugLibSynth
- # define DebugLibSynth NO
- #endif
- #ifndef ProfileLibSynth
- # define ProfileLibSynth NO
- #endif
- #ifndef SharedSynthRev
- # define SharedSynthRev MotifSharedRev
- #endif
- #ifndef SharedLibMCommon
- # define SharedLibMCommon HasSharedLibraries
- #endif
- #ifndef NormalLibMCommon
- # define NormalLibMCommon (!SharedLibMCommon | ForceNormalLib)
- #endif
- #ifndef DebugLibMCommon
- # define DebugLibMCommon NO
- #endif
- #ifndef ProfileLibMCommon
- # define ProfileLibMCommon NO
- #endif
- #ifndef SharedMCommonRev
- # define SharedMCommonRev MotifSharedRev
- #endif
- #ifndef XmClientLibs
- # define XmClientLibs $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
- #endif
- #ifndef XmClientDepLibs
- # define XmClientDepLibs $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
- #endif
- #ifndef MrmClientLibs
- # define MrmClientLibs $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
- #endif
- #ifndef MrmClientDepLibs
- # define MrmClientDepLibs $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
- #endif
- #ifndef UilClientLibs
- # define UilClientLibs $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
- #endif
- #ifndef UilClientDepLibs
- # define UilClientDepLibs $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
- #endif
- #ifndef TestClientLibs
- # define TestClientLibs $(PURIFYLIBS) $(TESTCOMLIB) \
- $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
- $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
- $(XMLIB) $(TESTGEOLIB) $(XTOOLLIB) $(XLIB) \
- $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
- #endif
- #ifndef TestUilClientLibs
- # define TestUilClientLibs $(PURIFYLIBS) $(TESTUILCOMLIB) $(TESTCOMLIB) \
- $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
- $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
- $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(TESTGEOLIB) \
- $(XTOOLLIB) $(XLIB) $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
- #endif
- #ifndef TestClientDepLibs
- # define TestClientDepLibs XmClientDepLibs
- #endif
- #ifndef TestUilClientDepLibs
- # define TestUilClientDepLibs UilClientDepLibs
- #endif
- /* hardcoded default path. Contrary to the original duplicate of USRLIBDIR
- in the Imakefiles. */
- #ifndef VirtualBindingsPath
- # define VirtualBindingsPath /usr/lib/Xm/bindings
- #endif
- MTOP = MTop
- TOP_MOTIF_INCLUDES = -I$(MINCLUDESRC)
- #if defined(UseInstalled) || (UseInstalledMotif && UseInstalledX11)
- UIL_INCLUDES = -I$(USRINCDIR)/uil
- #else
- UIL_INCLUDES = -I$(UILSRC)
- #endif
- #ifdef BuildLibPathVar
- MOTIFENVLIBDIR = MotifBuildLibPath
- #endif
- /* Message catalog usage */
- #ifndef GencatCmd
- # define GencatCmd gencat
- #endif
- #ifndef GencatFlags
- # define GencatFlags /**/
- #endif
- #if defined(NoMessageCatalog)
- # define BuildMessageCatalog NO
- # define MessageCatalogDefines -DNO_MESSAGE_CATALOG
- #else
- # define BuildMessageCatalog YES
- # define MessageCatalogDefines /**/
- #endif
- #ifndef MessageCatalogRule
- # if BuildMessageCatalog
- # define MessageCatalogRule(prefix) Real_MessageCatalogRule(prefix)
- # else
- # define MessageCatalogRule(prefix) Stub_MessageCatalogRule(prefix)
- # endif
- #endif
- USRINCDIR = UsrIncDir
- UIDDIR = UidDir
- TESTSRC = $(MTOP)/tests
- TESTLIB = $(TESTSRC)/lib
- GENERALSRCLIB = $(TESTSRC)/General/lib
- GENERALSRCBIN = $(TESTSRC)/General/bin
- MANUALSRCLIB = $(TESTSRC)/Manual/lib
- MANUALSRCBIN = $(TESTSRC)/Manual/bin
- AUTOSRCLIB = $(TESTSRC)/Auto/lib
- AUTOSRCBIN = $(TESTSRC)/Auto/bin
- COMMONPP = $(GENERALSRCBIN)/Commonpp
- GENRUN = $(GENERALSRCBIN)/Genrun
- MANRUN = $(GENERALSRCBIN)/Manrun
- #ifdef DebugLib
- TESTMALLOCSRC = $(GENERALSRCLIB)/Malloc
- #endif
- #ifdef DebugGeometry
- TESTGEOSRC = $(TESTLIB)/Geometry
- #endif
- #ifdef Automation
- TESTCOMSRC = $(AUTOSRCLIB)/Common
- AUTOSCRIPTSRC = $(AUTOSRCLIB)/Script
- AUTOSYNTHSRC = $(AUTOSRCLIB)/Synth
- AUTOCREATESRC = $(AUTOSRCLIB)/Create
- AUTOVISUALSRC = $(AUTOSRCLIB)/Visual
- AUTOUTILSRC = $(AUTOSRCLIB)/Util
- AUTOEXTRALIBS = -ll -ly -lm
- #else
- TESTCOMSRC = $(MANUALSRCLIB)/Common
- #endif
- BUILDDOCDIR = BuildDocDir
- BUILDLOCDIR = BuildLocDir
- /* MTOOLKITSRC should be removed */
- MTOOLKITSRC = $(TOOLKITSRC)
- #if ImportMotif || UseInstalledMotif
- MDOCSRC = $(MTOP)/doc
- MLOCSRC = $(MTOP)/localized
- #else
- MLOCSRC = $(MTOP)/exports/localized
- #endif
- #if defined(TopMotifInclude)
- MINCLUDESRC = TopMotifInclude
- #elif ImportMotif || UseInstalledMotif
- MINCLUDESRC = $(MTOP)/include
- #else
- MINCLUDESRC = $(MTOP)/exports/include
- #endif
- MLIBSRC = $(MTOP)/lib
- MCLIENTSRC = $(MTOP)/clients
- MDEMOSRC = $(MTOP)/demos
- MWIDGETSRC = $(MLIBSRC)/Xm
- MRESOURCESRC = $(MLIBSRC)/Mrm
- UILSRC = $(MCLIENTSRC)/uil
- #ifdef MotifProjectRoot
- MPROJECTROOT = MotifProjectRoot
- #endif
- UIL = _MUse(uil,$(UILSRC)/uil)
- DEPUIL = _MUseCat($(BINDIR),$(UILSRC),/uil)
- XMEXTRA_LIBS = XmExtraLibraries
- /* These libraries use UseInstalledMotif instead of UseInstalled. */
- #undef _Use
- #undef _UseCat
- #define _Use _MUse
- #define _UseCat _MUseCat
- #ifndef MBuildLibDir
- # define MBuildLibDir BuildLibDir
- #endif
- #if SharedLibXm
- SharedLibReferences(XM,Xm,$(MWIDGETSRC),SOXMREV,SharedXmRev)
- #else
- ProjectUnsharedLibReferences(XM,Xm,$(MWIDGETSRC),MBuildLibDir)
- #endif
- #if SharedLibMrm
- SharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),SOMRMREV,SharedMrmRev)
- #else
- ProjectUnsharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),MBuildLibDir)
- #endif
- #if SharedLibUil
- SharedLibReferences(UIL,Uil,$(UILSRC),SOUILREV,SharedUilRev)
- #else
- ProjectUnsharedLibReferences(UIL,Uil,$(UILSRC),MBuildLibDir)
- #endif
- #ifdef DebugGeometry
- ProjectUnsharedLibReferences(TESTGEO,XtGeo,$(TESTGEOSRC),MBuildLibDir)
- #endif
- #if Automation
- # if SharedLibACommon
- SharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),SOACOMMONREV,SharedACommonRev)
- # else
- ProjectUnsharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),MBuildLibDir)
- # endif
- TESTUILCOMLIB = $(TESTCOMSRC)/libACommonUil.a
- # if SharedLibScript
- SharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),SOSCRIPTREV,SharedScriptRev)
- # else
- ProjectUnsharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),MBuildLibDir)
- # endif
- # if SharedLibSynth
- SharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),SOSYNTHREV,SharedSynthRev)
- # else
- ProjectUnsharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),MBuildLibDir)
- # endif
- # if SharedLibCreate
- SharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),SOCREATEREV,SharedCreateRev)
- # else
- ProjectUnsharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),MBuildLibDir)
- # endif
- # if SharedLibVisual
- SharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),SOVISUALREV,SharedVisualRev)
- # else
- ProjectUnsharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),MBuildLibDir)
- # endif
- # if SharedLibUtil
- SharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),SOUTILREV,SharedUtilRev)
- # else
- ProjectUnsharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),MBuildLibDir)
- # endif
- #else /* Manual */
- # if SharedLibMCommon
- SharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),SOMCOMMONREV,SharedMCommonRev)
- # else
- ProjectUnsharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),MBuildLibDir)
- # endif
- TESTUILCOMLIB = $(TESTCOMSRC)/libMCommonUil.a
- #endif /* Automation */
- /* Revert to the normal library rules. */
- #undef _Use
- #undef _UseCat
- #define _Use _XUse
- #define _UseCat _XUseCat
- #ifdef UsePurify
- PURIFYLIBS = $(PURIFYHOME)/purify_stubs.a
- #endif
- LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
- LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
- LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
- LINTUILLIB = $(UILSRC)/llib-lUil.ln
- YACCFLAGS = YaccFlags
- UILFLAGS = UilFlags
- GENCATFLAGS = GencatFlags
- GENCAT = GencatCmd $(GENCATFLAGS)
- MKCATTOOL = $(TOP)/programs/localized/util/mkcatdefs
- RM_CMD = $(RM) FilesToClean ExtraFilesToClean TestExtraFilesToClean
- #if NeedDefaultDepLibs
- # if HasSharedLibraries || defined(UseInstalled)
- DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
- # else
- DEPLIBS = $(LOCAL_LIBRARIES)
- # endif
- DEPLIBS1 = $(DEPLIBS)
- DEPLIBS2 = $(DEPLIBS)
- DEPLIBS3 = $(DEPLIBS)
- #endif /* NeedDefaultDepLibs */
- /* check for existence of Dtinfo Motif Documents */
- #if defined(LinuxArchitecture)
- MOTIF_DOC = $(shell if test -f $(MDOCSRC)/C/guides/bookcase.bc; then echo -D_MOTIFDOC_; fi)
- #elif defined(SunArchitecture)
- MOTIF_DOC :sh = if test -f ../imports/motif/doc/C/guides/bookcase.bc; then echo -D_MOTIFDOC_; else echo; fi
- #elif defined(BSDArchitecture)
- MOTIF_DOC != if test -f $(MDOCSRC)/C/guides/bookcase.bc; then echo -D_MOTIFDOC_; else echo; fi
- #else
- MOTIF_DOC = -D_MOTIFDOC_
- #endif
|