README revision d7ffce2a
1The xorg-cf-files package contains the data files for the imake utility, 2defining the known settings for a wide variety of platforms (many of which 3have not been verified or tested in over a decade), and for many of the 4libraries formerly delivered in the X.Org monolithic releases. 5 6The X Window System used imake extensively up through the X11R6.9 release, 7for both full builds within the source tree and external software. 8X has since moved to GNU autoconf and automake for its build system in 9X11R7.0 and later releases, but still maintains imake for building existing 10external software programs that have not yet converted. 11 12More information about Imake and its usage may be found in the resources 13at: 14 http://www.snake.net/software/imake-stuff/ 15 http://www.kitebird.com/imake-book/ 16 17All questions regarding this software should be directed at the 18Xorg mailing list: 19 20 http://lists.freedesktop.org/mailman/listinfo/xorg 21 22Please submit bug reports to the Xorg bugzilla: 23 24 https://bugs.freedesktop.org/enter_bug.cgi?product=xorg 25 26The master development code repository can be found at: 27 28 git://anongit.freedesktop.org/git/xorg/util/cf 29 30 http://cgit.freedesktop.org/xorg/util/cf 31 32For patch submission instructions, see: 33 34 http://www.x.org/wiki/Development/Documentation/SubmittingPatches 35 36For more information on the git code manager, see: 37 38 http://wiki.x.org/wiki/GitPage 39 40------------------------------------------------------------------------------ 41 42$Xorg: README,v 1.4 2000/08/18 04:03:58 coskrey Exp $ 43$XFree86: xc/config/cf/README,v 1.20 2003/04/14 20:35:50 herrb Exp $ 44 45The easiest way to write an Imakefile is to find another one that does 46something similar and copy/modify it! 47 48To change any of these variables, edit the site.def file. 49 50Imake.tmpl provides defaults for the following variables: 51 52 AlternateIncRoot compiler needs -I to find project includes 53 AlternateUsrLibDir linker needs -L to find project libraries 54 ArCmd command used to create libraries 55 ArCmdBase program name part of ArCmd 56 ArAddCmd flags to have ArCmdBase add files to a library 57 ArExtCmd flags to have ArCmdBase extract files 58 AsCmd command used to run assembler 59 BootstrapCFlags missing cpp symbols needed to get started 60 BourneShell command used to run Bourne Shell 61 CCsuf suffix that C++ source files have 62 CURDIR current directory relative to top of sources 63 CcCmd command to run C compiler 64 CompressCmd command to run compress program 65 ConstructMFLAGS System V option to set MFLAGS make variable 66 CpCmd command to copy one file to another 67 CplusplusCmd command to run C++ compiler 68 CplusplusFilt command to run C++ name demangler 69 CplusplusYaccCmd command to produce C++ source from yacc source 70 CppCmd command to run C preprocessor 71 CrossCompiling cross compiling? (not fully supported) 72 DebuggableCDebugFlags C compiler -I's and -D's to turn on debug info 73 DefaultCCOptions default special C compiler options 74 DefaultCDebugFlags debug/optimize flags for programs 75 DefaultUsrBin program directory used even if PATH not set 76 DependFlags extra makedepend flags 77 DoRanlibCmd boolean for system uses ranlib 78 EqnCmd command used for eqn 79 ExecableScripts boolean for systems that can exec() #!/bin/sh 80 ExpandManNames boolean to expand man pages names to long form 81 ExtraFilesToClean extra files to remove on make clean 82 ExtraLibraries system-specific libraries need to link 83 ExtraLoadFlags system-specific loader flags 84 FileManSuffix man suffix for file format pages 85 FilesToClean files to delete in make clean 86 FortranCmd command to run Fortran compiler 87 FortranDebugFlags flags for Fortran debug info 88 FortranFlags Fortran compiler flags 89 GzipCmd command to run gzip program 90 HasBSD44Sockets boolean for system has BSD4.4 sockets 91 HasBsdMake use the 4.4BSD variant of the make program? 92 HasBsearch boolean for libc has bsearch() 93 HasBrokenCCForLink boolean for brain damaged cc driver 94 HasCenterLineC boolean for system has CenterLine C compiler 95 HasCenterLineCplusplus boolean for system has CenterLine C++ compiler 96 HasClearmake use Clearcase's clearmake make program? 97 HasCodeCenter boolean for system has CodeCenter 98 HasCookieMaker boolean for system has xauth cookie generator 99 HasCplusplus system has a C++ compiler? 100 HasDECnet system has DECnet? 101 HasFortran boolean for system has Fortran compiler 102 HasGcc boolean for system has GNU gcc compiler 103 HasGcc2 boolean for system has GNU gcc 2.x compiler 104 HasGcc2ForCplusplus use gcc 2 for C++ programs? 105 HasGnuMake use the GNU make program? 106 HasGhostPCL boolean for system has GhostPCL 107 HasGhostScript boolean for system has GhostScript 108 HasKrbIV system has Kerberos version IV support? 109 HasKrb5 system has Kerberos version 5 support? 110 HasLargeTmp boolean for system has /tmp space 111 HasLatex system has LaTeX document preparation software 112 HasLibCrypt boolean for system has libcrypt 113 HasMotif boolean for system has Motif 114 HasMotif2 boolean for system has Motif2 or OpenMotif 115 HasNdbm boolean for system has ndbm routines 116 HasPoll use poll() syscall? 117 HasPurify boolean for system has Purify 118 HasPutenv boolean for libc has putenv() 119 HasSecureRPC boolean for Sun Secure RPC 120 HasSetProcTitle boolean for setproctitle() 121 HasSetUserContext boolean for setusercontext() 122 HasSentinel boolean for system has Sentinel available 123 HasSharedLibraries boolean for system has shared libraries 124 HasShm boolean for System V shared memory 125 HasSockets boolean for system has BSD sockets 126 HasStrcasecmp boolean for system implements str[n]casecmp 127 HasStreams use STREAMS I/O interface? 128 HasSymLinks boolean for system has symbolic links 129 HasTestCenter boolean for system has TestCenter 130 HasVarDirectory boolean for system has /var 131 HasVFork boolean for system has vfork() 132 HasVoidSignalReturn boolean for POSIX signal() procs 133 HasZlib boolean for system has libz 134 IncludeSharedObjectInNormalLib define for static libs to include 135 -fPIC objects on relevant archs 136 IncRoot parent of X11 include directory 137 InstBinFlags install flags for binaries 138 InstDatFlags install flags for data files 139 InstIncFlags install flags for header files 140 InstKmemFlags install flags for xload to get at /dev/kmem 141 InstLibFlags install flags for libraries 142 InstManFlags install flags for manual pages 143 InstPgmFlags install flags for normal programs 144 InstUidFlags install flags for xterm to chown /dev/ptys 145 InstallCmd command to install files 146 KrbIVIncludes where to include KerberosIV header files from 147 KrbIVLibraries where to load KerberosIV libraries from 148 Krb5Includes where to include Kerberos header files from 149 Krb5Libraries where to load Kerberos libraries from 150 LdCmd command to run loader 151 LdCombineFlags flags for incremental loading 152 LexCmd command to run lex 153 LexLib library for programs using lex output 154 LintCmd command to run lint 155 LintLibFlag flags to generate lint libraries 156 LintOpts lint options to control strictness 157 LnCmd command to link two files 158 LoaderLibPrefix loader flags before libraries 159 LocalRulesFile site-specific file with additional imake rules 160 LocalTmplFile file with additional imake variables 161 MacroFile name of machine-dependent config params file 162 MacroIncludeFile <MacroFile> 163 MakeCmd command to run make 164 Malloc0ReturnsNull boolean for malloc(0) == NULL 165 Malloc0ReturnsNullDefines -D's to build libX11/libXt 166 MathLibrary library for programs using C math functions 167 MkCookieCmd command to generate an xauth cookie 168 MsMacros macro flag for TroffCmd, normally "-ms" 169 MvCmd command to rename a file 170 NdbmDefines -D's to turn on use of ndbm routines 171 NeedConstPrototoypes whether const is supported 172 NeedFunctionPrototypes whether or not to force function prototypes 173 NeedNestedPrototypes whether nested prototypes are supported 174 NeedVarargsPrototypes whether varargs prototypes are supported 175 NeedWidePrototypes whether or not to widen function prototypes 176 NoOpCDebugFlags C compiler flags to not debug or optimize 177 NoRConst YES if const for structs of funcs is bad 178 OSMajorVersion major version number of operating system 179 OSMinorVersion minor version number of operating system 180 OSName operating system name 181 OSTeenyVersion maintenance version number of operating system 182 OptimizedCDebugFlags C compiler flags to turn on optimization 183 XtPopdownConformance XtPopdown conformans to the specification 184 PreProcessCmd command to run /lib/cpp on scripts 185 RanlibCmd command to clean up libraries 186 RanlibInstFlags flags to ranlib after copying 187 ResourceConfigurationManagement boolean for Xt's Resource Configuration 188 Management 189 RmCmd command to delete files 190 ShLibDir directory in which to install shared libraries 191 StandardCppDefines -D's for running cpp 192 StandardDefines -D's for running C compiler 193 StandardIncludes -I's for running C compiler 194 StripInstalledPrograms boolean for sites that want to install -s 195 SystemV boolean for systems that are at least SVR2 196 SystemV4 boolean for SVR4 systems 197 TOPDIR relative path to top of sources 198 TagsCmd command to run tags 199 TblCmd command to run tbl 200 TroffCmd command to run troff to get PostScript 201 UNCOMPRESSPATH command to run uncompress (obsolete) 202 UnalignedReferencesAllowed boolean for unaligned copies ok 203 UsrLibDir directory in which to install libraries 204 YaccCmd command to run yacc 205 206X11.tmpl provides defaults for the following variables: 207 208 AdmDir directory containing system log files 209 AllocateLocalDefines -D's to turn on alloca() (should be in Imake.tmpl) 210 BDFTOSNFFILT command to run bdftosnf 211 BaseExtensionDefines universal extensions to use 212 BinDir directory in which to install programs 213 BuildAppgroup build AppGroup extension in server 214 BuildCup build Colormap Utilization extension in server 215 BuildDBE build DOUBLE-BUFFER extension 216 BuildDmx build Distributed Multihead X server and extension 217 BuildDPMS build Display Power Management Signaling extension 218 BuildFontServer build font server 219 BuildFonts build pcf fonts 220 BuildIncRoot relative path to location of headers in build 221 BuildIncTop path from build includes directory to top 222 BuildEVI build EVI server extension 223 BuildLBX build LBX (aka X.fast) server extension 224 BuildMultibuffer build Multibuffer extension (obsolete) 225 BuildPlugin build xrx plug-in for web browsers 226 BuildRECORD Build RECORD extension 227 BuildServer build X server 228 BuildXAudio build Audio 229 BuildXAServer build Audio server 230 BuildXCSecurity Build Security Extension 231 BuildXInputExt build X Input extension (requires ddx support, 232 which exists only in Xhp and XFree86) 233 BuildXInputLib build X Input library 234 BuildXKB build X Keyboard Extension? 235 BuildXKBlib build X Keyboard Extension into Xlib? 236 UseXKBInClients Use XKB functions in normal clients? 237 ConfigDir install directory for config files 238 ConnectionFlags -D's for supported transports 239 ContribDir location of user-contributed sources 240 DebugLibFS build libFS_d.a 241 DebugLibICE build libICE_d.a 242 DebugLibSM build libSM_d.a 243 DebugLibX11 build libX11_d.a 244 DebugLibXau build libXau_d.a 245 DebugLibXaw build libXaw_d.a 246 DebugLibXdmcp build libXdmcp_d.a 247 DebugLibXext build libXext_d.a 248 DebugLibXi build libXi_d.a 249 DebugLibXmu build libXmu_d.a 250 DebugLibXt build libXt_d.a 251 DebugLibXtst build libXtst_d.a 252 DebugLibXag build libXag_d.a 253 DebugOldX build liboldX_d.a 254 DefaultCursorTheme name of default cursor theme 255 DefaultFSConfigFile default font server config file 256 DefaultFontPath default server font path 257 DefaultRGBDatabase default server rgb color database 258 DefaultSystemPath default system xdm PATH environment variable 259 DefaultSystemShell default /bin/sh 260 DefaultUserPath default user xdm PATH environment variable 261 DependCmd command to run makedepend 262 DependDir build directory containing makedepend program 263 DriverManDir directory in which to install driver man pages 264 DriverManSuffix man suffix for driver pages 265 ExtensionDefines -D's for universal extensions 266 ExtensionOSDefines -D's for additional extensions 267 FontCompilerFlags flags for bdftosnf 268 FontDefines -D's to turn on font options 269 FontDir directory in which to install fonts 270 FontFilters -D's to specify font conversion filters 271 FontOSDefines -D's for which fonts to support 272 ForceNormalLib force building of .a in addition to shared lib 273 GzipFontCompression boolean for using gzip instead of compress 274 HasXdmAuth boolean for using XDM-AUTHORIZATION-1; 275 needs Wraphelp.c, see Release Notes 276 InstallAppDefFiles install new app defaults files over old? 277 InstallFSConfig install fs config file over old? 278 InstallLibManPages boolean for installing library man pages 279 InstallSecurityConfig install server security policy file over old? 280 InstallXdmConfig install xdm config files over old? 281 InstallXinitConfig install xinit config files over old? 282 KrbIVDefines defines for use with KerberosIV 283 LibDir directory in which to install X11 support files 284 LibManSuffix man suffix for library pages 285 LibmanDir directory in which to install library man pages 286 LintlibDir directory in which to install lint libs 287 ManDir directory in which to install program man pages 288 ManDirectoryRoot parent of man directories relative to root 289 ManPath full path of parent directory 290 ManSourcePath common prefix of man page directories 291 ManSuffix man suffix for programs 292 MiscManSuffix man suffix for miscellaneous pages 293 MiscManDir directory in which to install misc man pages 294 NeedDefaultDepLibs boolean for enabling default DEPLIBS 295 NlsDir directory in which to install nls files 296 NormalLibFS build libFS.a 297 NormalLibICE build libICE.a 298 NormalLibSM build libSM.a 299 NormalLibX11 build libX11.a 300 NormalLibXau build libXau.a 301 NormalLibXaw build libXaw.a 302 NormalLibXdmcp build libXdmcp.a 303 NormalLibXext build libXext.a 304 NormalLibXi build libXi.a 305 NormalLibXmu build libXmu.a 306 NormalLibXt build libXt.a 307 NormalLibXtst build libXtst.a 308 NormalLibXag build libXag.a 309 NormalOldX build liboldX.a 310 OsNameDefines If uname(2) unavailable, set to -DOS_NAME=OSName 311 PrimaryScreenResolution resolution of default server screen 312 ProfileLibFS build libFS_p.a 313 ProfileLibICE build libICE_p.a 314 ProfileLibSM build libSM_p.a 315 ProfileLibX11 build libX11_p.a 316 ProfileLibXau build libXau_p.a 317 ProfileLibXaw build libXaw_p.a 318 ProfileLibXdmcp build libXdmcp_p.a 319 ProfileLibXext build libXext_p.a 320 ProfileLibXi build libXi_p.a 321 ProfileLibXmu build libXmu_p.a 322 ProfileLibXt build libXt_p.a 323 ProfileLibXtst build libXtst_p.a 324 ProfileLibXag build libXag_p.a 325 ProfileOldX build liboldX_p.a 326 ProjectX version indicating this is the X Window System 327 RemoveTargetProgramByMoving boolean for rm -f that doesn't 328 SHELLPATH -D for /bin/sh 329 ServerConfigDir directory for server security config files 330 ServerDefines complete -D's for server 331 ServerExtraDefines special -D's for server 332 ServerOSDefines OS -D's for server 333 ServerAssertDefines -DNDEBUG for no assertions, /**/ for assertions 334 SharedLibFS boolean for making sharable libFS.so 335 SharedLibICE boolean for making sharable libICE.so 336 SharedLibSM boolean for making sharable libSM.so 337 SharedLibX11 boolean for making sharable libX11.so 338 SharedLibXau boolean for making sharable libXau.so 339 SharedLibXaw boolean for making sharable libXaw.so 340 SharedLibXdmcp boolean for making sharable libXdmcp.so 341 SharedLibXext boolean for making sharable libXext.so 342 SharedLibXi boolean for making sharable libXi.so 343 SharedLibXmu boolean for making sharable libXmu.so 344 SharedLibXt boolean for making sharable libXt.so 345 SharedLibXtst boolean for making sharable libXtst.so 346 SharedLibXag boolean for making sharable libXag.so 347 SharedOldX boolean for making sharable liboldX.so 348 ShmDefines MIT-SHM define 349 TwmDir directory in which to install twm config files 350 UseCCMakeDepend boolean for using alternate makedepend script 351 UseRgbTxt use rgb.txt file as is instead of DBM-compiled 352 VarDirectory directory in /var for logs, etc., and config 353 VendorHasX11R6_3libXext don't need Security & AppGroup in xrx plug-in 354 XAppLoadDir directory in which to install app defaults 355 XFileSearchPathBase base file search path 356 XFileSearchPathDefault default path to search for app defaults files 357 XInputDefines XINPUT define 358 XMalloc0ReturnsNullDefines -D's specifically for libX11 359 XawClientDepLibs DEPLIBS for clients that use Xaw 360 XawClientLibs LOCAL_LIBRARIES for clients that use Xaw 361 XdmConfigurationSubdirectory name of default xdm configuration 362 XdmDir directory in which to install xdm files 363 XdmServersType type of xdm Xservers file to install 364 XinitDir directory in which to install xinit files 365 XPrintDir parent of X Print server config directory 366 XprtServer build the X Print server 367 XpRasterDDX include the raster print ddx driver 368 XpColorPclDDX include the color PCL print ddx driver 369 XpMonoPclDDX include the monochrome PCL print ddx driver 370 XpPostScriptDDX include the PostScript print ddx driver 371 XpPdfDDX include the PDF print ddx driver 372 XpSvgDDX include the SVG print ddx driver 373 XmanLocalSearchPath non-standard path for man pages 374 XtErrorPrefix leading text in XtError() msg; eg. 'X Toolkit ' 375 XtWarningPrefix leading text in XtWarning()msg, same as above 376 XtMalloc0ReturnsNullDefines -D's specifically for libXt 377 ZBDFTOSNFFILT -D to run uncompress and bdftosnf (obsolete) 378 379 380Library.tmpl provides defaults for the following variables: 381 382 AvoidNullMakeCommand for makes that spout about $(_NULLCMD_) 383 LibraryCCOptions special C compiler options for libraries 384 LibraryCDebugFlags library debug/optimize flags to override defs 385 LibraryCcCmd command to run C compiler in libraries 386 LibraryCplusplusOptions special C++ options for libraries 387 LibraryCplusplusDebugFlags library debug/optimize flags for C++ 388 LibraryCplusplusCmd command to run C++ compiler in libraries 389 LibraryDefines -D's for libraries 390 SeparateSharedCompile shared and unshared libs use same binaries? 391 392 393Server.tmpl provides defaults for the following variables: 394 395 ServerCCOptions server C compiler options to override defaults 396 ServerCcCmd command to run C compiler in server 397 ServerCDebugFlags server debug/opt compiler flags 398 ServerDefines server standard -D's 399 InstallServerSetUID does this system need X server suid to root? 400 401 402Threads.tmpl provides defaults for the following variables: 403 404 LocalThreads whether to enable multi-threading support 405 LocalThreadsDefines -D flags needed in this directory 406 407 408An <os>Lib.rules file provides defaults for the following variables: 409 410 HasSharedLibraries boolean for using shared libraries 411 SharedDataSeparation boolean indicating separate data/code 412 SharedCodeDef -D's for compiling shared library files 413 SharedLibraryDef -D's for defining which kind of shared lib 414 ShLibIncludeFile location of the <os>Lib.tmpl file 415 SharedLibraryLoadFlags loader flags when making the library 416 UseExportLists boolean for using an export list 417 PositionIndependentCFlags PIC compiler flags for C 418 PositionIndependentCplusplusFlags PIC compiler flags for C++ 419 420 Note: PositionIndependentCplusplusFlags is only required if the 421 C and C++ compilers use different flags to build PIC code. The 422 default configuration will try to use PositionIndependentCFlags 423 for both C and C++ compiles. 424 425An <os>Lib.tmpl file provides defaults for the following variables: 426 427 SharedFSReqs required libs for libFS.so 428 SharedFSRev version number for libFS.so 429 SharedICEReqs required libs for libICE.so 430 SharedICERev version number for libICE.so 431 SharedOldXReqs required libs for liboldX.so 432 SharedOldXRev version number for liboldX.so 433 SharedSMReqs required libs for libSM.so 434 SharedSMRev version number for libSM.so 435 SharedX11Reqs required libs for libX11.so 436 SharedX11Rev version number for libX11.so 437 SharedXauReqs required libs for libXau.so 438 SharedXauRev version number for libXau.so 439 SharedXawReqs required libs for libXaw.so 440 SharedXawRev version number for libXaw.so 441 SharedXdmcpReqs required libs for libXdmcp.so 442 SharedXdmcpRev version number for libXdmcp.so 443 SharedXextReqs required libs for libXext.so 444 SharedXextRev version number for libXext.so 445 SharedXiReqs required libs for libXi.so 446 SharedXiRev version number for libXi.so 447 SharedXmuReqs required libs for libXmu.so 448 SharedXmuRev version number for libXmu.so 449 SharedXtReqs required libs for libXt.so 450 SharedXtRev version number for libXt.so 451 SharedXtstReqs required libs for libXtst.so 452 SharedXtstRev version number for libXtst.so 453 SharedXmReqs required libs for libXm.so 454 SharedXmRev version number for libXm.so 455 SharedMrmReqs required libs for libMrm.so 456 SharedMrmRev version number for libMrm.so 457 SharedUilReqs required libs for libUil.so 458 SharedUilRev version number for libUil.so 459 SharedTtReqs required libs for libtt.so 460 SharedTtRev version number for libtt.so 461 SharedPamReqs required libs for libpam.so 462 SharedPamRev version number for libpam.so 463 SharedDtSvcReqs required libs for libDtSvc.so 464 SharedDtSvcRev version number for libDtSvc.so 465 SharedDtSearchReqs required libs for libDtSearch.so 466 SharedDtSearchRev version number for libDtSearch.so 467 SharedDtWidgetReqs required libs for libDtWidget.so 468 SharedDtWidgetRev version number for libDtWidget.so 469 SharedDtHelpReqs required libs for libDtHelp.so 470 SharedDtHelpRev version number for libDtHelp.so 471 SharedDtPrintReqs required libs for libDtPrint.so 472 SharedDtPrintRev version number for libDtPrint.so 473 SharedDtTermReqs required libs for libDtTerm.so 474 SharedDtTermRev version number for libDtTerm.so 475 SharedDtMrmReqs required libs for libDtMrm.so 476 SharedDtMrmRev version number for libDtMrm.so 477 478Vendor.cf files and/or site/host specific .def files may define the 479following variables: 480 481 ProjectRoot The directory under which the installation 482 will operate. This value will be hard coded 483 into some programs. As a result do not use it 484 to specify the installation directory for a 485 cross compiled system, use DESTDIR to 486 accomplish that task. 487 488The following variables are used by some part of the tree: 489 490 AckToolset programs/Xserver/hw/xfree86 491 BuildChooser build the xdm chooser program? 492 SharedLibXdmGreet use xdm shared dynamic greeter library? 493 LatexCmd command to run LaTeX on a document 494 DvipsCmd command to turn .dvi file into PostScript 495 MotifBC using Motif 1.1.1, 1.1.2, or 1.1.3? 496 GetValuesBC compat GetValues behavior for broken apps? 497 NeedBerklib application needs libXbsd? 498 SvgaConfig default SVGA configuration 499 HasGetReturnAddress util/memleak 500 HasShadowPasswd system has getspnam() function 501 XnestServer build X server with Xlib-based ddx 502 XVirtualFramebufferServer build X server with virtual memory framebuffer 503 WebServer host:port of your Web server (see programs/xrx) 504 HtmlDir path used by Web server for HTML and RX docs 505 CgiBinDir path used by Web server for CGI programs 506 ProxyManager ICE network ID to contact a running proxymngr 507 XdmxServer build Distributed Multihead X server 508 509 510Make Variables 511 512The following make variables are used by imake rules and may be set in 513an individual Imakefile. 514 515DEFINES program-specific -D flags and other arguments 516 to pass to the C compiler, lint, and makedepend. 517DEPEND_DEFINES program-specific flags in addition to 518 $(DEFINES) to pass to lint and makedepend. 519 This is usually used when there are special 520 compilation rules for individual files, and 521 the defines passed to those files affect 522 makedepend results. If they can be passed to 523 all files during the makedepend step without 524 affecting the results for other files, 525 DEPEND_DEFINES is used to do that. Example is 526 the Xlib Imakefile. 527INCLUDES program-specific -I flags. 528HEADERS .h files to install with "make includes" and 529 "make install". If this Imakefile includes 530 Library.tmpl there are no headers, include 531 this line instead of a HEADERS definition: 532 #define LibHeaders NO 533REQUIREDLIBS when building a shared library, other libraries used 534 by this library that should be referenced at 535 link time. 536LINTLIBS program-specific libraries for lint. 537LOCAL_LDFLAGS program-specific flags for the linker. 538LOCAL_LIBRARIES project libraries (usually specified 539 as -lname) needed by this program. 540 For example, "-lXt -lXext -lX11". 541 Used by SimpleProgramTarget and 542 ComplexProgramTarget* rules. 543 Do not include any system-specific libraries here. 544SYS_LIBRARIES system libraries (usually specified 545 as -lname) needed by this program. 546 For example "MathLibrary". 547 Do not include any system-specific libraries 548 such as "-lnsl" here; they are automatically 549 added to the link command by the 550 vendor-specific .cf file. 551SUBDIRS for an Imakefile in a directory containing 552 subdirectories, this names the subdirectories. 553 Such an Imakefile also needs to #define IHaveSubdirs 554 and call MakeSubdirs() and DependSubdirs(). 555MANSUFFIX suffix used by InstallManPage* rules. 556 May be set to $(LIBMANSUFFIX), $(FILEMANSUFFIX), or 557 $(MISCMANSUFFIX) in directories for libraries or data 558 files. 559 560 561Rule-specific variables that may be set in an individual Imakefile. 562If you aren't using these rules, you may need variables with a similar 563function, but you need not use these names. However, following these 564conventions may make your Imakefile easier to read and maintain. 565 566DEPLIBS library dependencies for ComplexProgramTarget 567SRCS source files used by ComplexProgramTarget and 568 DependTarget. 569OBJS object files used by ComplexProgramTarget 570PROGRAMS default target used with ComplexProgramTarget_(n) 571SRCS1 source files used by ComplexProgramTarget_1 572OBJS1 object files used by ComplexProgramTarget_1 573DEPLIBS1 library dependencies for ComplexProgramTarget_1 574SRCS2 source files used by ComplexProgramTarget_2 575OBJS2 object files used by ComplexProgramTarget_2 576DEPLIBS2 library dependencies for ComplexProgramTarget_2 577SRCS3 source files used by ComplexProgramTarget_3 578OBJS3 object files used by ComplexProgramTarget_3 579DEPLIBS3 library dependencies for ComplexProgramTarget_3 580 581Variables that can be set on the make command line: 582 583DESTDIR directory under which "make install" should 584 install instead of "/"; used only for testing 585 "make install" rules, binary package building, 586 and specifying alternative installation directories 587 for cross compiles. 588FILE file for "lint1" target to run lint on. 589CDEBUGFLAGS -g and/or -O flag to control C compiler optimization. 590CXXDEBUGFLAGS -g and/or -O flag to control C++ optimization. 591LDSTRIPFLAGS flag to have linker strip objects (typically -x). 592 Typically set to the empty string to prevent 593 the linker from stripping objects; use this 594 way when setting CDEBUGFLAGS to "-g". 595 596These variables are set in project-specific files such as X11.tmpl. 597They should NOT be set in an Imakefile. These variables are sometimes 598misused; they are included here to remind Imakefile writers NOT to use 599them: 600 601EXTRA_DEFINES project-specific -D flags 602EXTRA_INCLUDES project-specific -I flags 603EXTRA_ICONFIGFILES Additional project-specific imake config files 604 to add to ICONFIGFILES. 605 This is a list of files that define variables 606 that might affect compilation of some files. 607 608Many other make variables are set up by the imake config files and can 609be used in an Imakefile. The easiest way to discover them is to look 610at the Makefile generated by an empty Imakefile. 611 612 613Comments 614 615Use C comment syntax in an Imakefile for comments that should not 616appear in the resulting Makefile. 617Use "XCOMM" at the start of each 618line to produce a comment that will appear in the Makefile. 619(The "XCOMM" will 620be translated into the Makefile comment character "#" by imake.) 621Do NOT use "#" as a comment character in Imakefiles; it confuses the C 622preprocessor used by imake on some systems. 623 624 625Imake variables 626 627Don't abuse the variables in X11.tmpl that describe 628particular pieces of X by using them to describe your own subsystems. 629Instead, create new variables that are defaulted using 630Imake.tmpl variables. 631 632 633Examples 634 635Since the easiest way to write an Imakefile is to start with one that 636works, here are some short, easy-to-read Imakefile examples in the X 637distribution: 638 639with subdirs: config/Imakefile 640library: lib/Xau/Imakefile 641simple program: programs/xdpyinfo/Imakefile 642complex progs: programs/xclipboard/Imakefile 643complex prog: programs/xmodmap/Imakefile 644 645Common Rules 646 647Here are some of the common rules for building programs. How to use 648them is described in Imake.rules and in the O'Reilly book "Software 649Portability with imake." 650 651Basic program-building rules 652 653All of these except NormalProgramTarget also generate rules to install 654the program and its manual page, and to generate dependencies. 655 656SimpleProgramTarget Use if there is only one program to be made 657 and it has only one source file. 658 659ComplexProgramTarget Use if there is only one program to be made 660 and it has multiple source files. Set SRCS to 661 the names of the source files, set OBJS to 662 the names of the object files, and set DEPLIBS 663 to the libraries that this program depends on. 664 665ComplexProgramTarget_1 Like ComplexProgramTarget, but uses SRCS1, 666 OBJS1, and DEPLIBS1 and can be used with 667 ComplexProgramTarget_2 and ComplexProgramTarget_3 668 to build up to three programs in the same directory. 669 Set PROGRAMS to the programs built by all of 670 these rules. For more than 3 programs, use 671 NormalProgramTarget for each. 672ComplexProgramTarget_2 Use after ComplexProgramTarget_1 for the 673 second program in a directory. Uses SRCS2, 674 OBJS2, and DEPLIBS2. 675ComplexProgramTarget_3 Use after ComplexProgramTarget_2 for the 676 third program in a directory. Uses SRCS3, 677 OBJS3, and DEPLIBS3. 678 679NormalProgramTarget Build a program. Can be used multiple times 680 with different arguments in the same Imakefile. 681 682Lower level rules, often used with NormalProgramTarget 683 684InstallProgram install a program. 685 686InstallManPage install a manual page. 687 688InstallDirectory install a directory. 689 690DependTarget() include once at end of Imakefile with 691 NormalProgramTarget rules or that uses Library.tmpl. 692 Generates dependencies for files named in SRCS. 693 694Manual page rules, commonly used only in special documentation directories: 695 696InstallManPage 697InstallManPageLong 698InstallManPageAliases 699 700Other rules: 701 702SpecialCObjectRule Compile a C file with special flags. 703AllTarget Declare additional targets to build. 704InstallAppDefaults Install X application defaults file. 705 706Imakefile for directory with subdirectories 707 708XCOMM this is a sample Imakefile for a directory containing subdirectories 709#define IHaveSubdirs 710#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" 711SUBDIRS = list of subdirs ... 712MakeSubdirs($(SUBDIRS)) 713DependSubdirs($(SUBDIRS)) 714 715 716Common Targets 717 718These targets are typically NOT defined explicitly by the Imakefile 719writer; rather they are generated automatically by imake rules. 720They are listed here for the convenience of people using the resulting 721Makefile, not people writing the original Imakefile. 722 723all Default rule; builds whatever is in this directory. 724Makefile Remake the Makefile (use after changing Imakefile). 725 Run "make depend" after. 726Makefiles Remake all Makefiles in subdirectories. (Does 727 nothing if no subdirectories.) 728 Run "make depend" after. 729includes Generate and install in the tree any necessary 730 header files. 731depend Update dependencies in the Makefile calculated 732 by examining the source files. 733install Install what "make all" built on the system. 734install.man Install manual pages. 735clean Remove built objects and other derived files. 736lint Run lint. 737tags Create a tags file. 738