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