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