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