Debian Codegraph @

nx-X11/config/cf/README

raw
1 The easiest way to write an Imakefile is to find another one that does
2 something similar and copy/modify it!
3
4 To change any of these variables, edit the site.def file.
5
6 Imake.tmpl provides defaults for the following variables:
7
8 AlternateIncRoot compiler needs -I to find project includes
9 AlternateUsrLibDir linker needs -L to find project libraries
10 ArCmd command used to create libraries
11 ArCmdBase program name part of ArCmd
12 ArAddCmd flags to have ArCmdBase add files to a library
13 ArExtCmd flags to have ArCmdBase extract files
14 AsCmd command used to run assembler
15 BootstrapCFlags missing cpp symbols needed to get started
16 BourneShell command used to run Bourne Shell
17 CCsuf suffix that C++ source files have
18 CURDIR current directory relative to top of sources
19 CcCmd command to run C compiler
20 CompressCmd command to run compress program
21 ConstructMFLAGS System V option to set MFLAGS make variable
22 CpCmd command to copy one file to another
23 CplusplusCmd command to run C++ compiler
24 CplusplusFilt command to run C++ name demangler
25 CplusplusYaccCmd command to produce C++ source from yacc source
26 CppCmd command to run C preprocessor
27 CrossCompiling cross compiling? (not fully supported)
28 DebuggableCDebugFlags C compiler -I's and -D's to turn on debug info
29 DefaultCCOptions default special C compiler options
30 DefaultCDebugFlags debug/optimize flags for programs
31 DefaultUsrBin program directory used even if PATH not set
32 DependFlags extra makedepend flags
33 DoRanlibCmd boolean for system uses ranlib
34 EqnCmd command used for eqn
35 ExecableScripts boolean for systems that can exec() #!/bin/sh
36 ExpandManNames boolean to expand man pages names to long form
37 ExtraFilesToClean extra files to remove on make clean
38 ExtraLibraries system-specific libraries need to link
39 ExtraLoadFlags system-specific loader flags
40 ExtraInstallLoadFlags system-specific loader flags for later installation
41 FileManSuffix man suffix for file format pages
42 FilesToClean files to delete in make clean
43 FortranCmd command to run Fortran compiler
44 FortranDebugFlags flags for Fortran debug info
45 FortranFlags Fortran compiler flags
46 GzipCmd command to run gzip program
47 HasBSD44Sockets boolean for system has BSD4.4 sockets
48 HasBsdMake use the 4.4BSD variant of the make program?
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 HasCookieMaker boolean for system has xauth cookie generator
56 HasCplusplus system has a C++ compiler?
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 HasGnuMake use the GNU make program?
62 HasGhostPCL boolean for system has GhostPCL
63 HasGhostScript boolean for system has GhostScript
64 HasLargeTmp boolean for system has /tmp space
65 HasLatex system has LaTeX document preparation software
66 HasLibCrypt boolean for system has libcrypt
67 HasMotif boolean for system has Motif
68 HasMotif2 boolean for system has Motif2 or OpenMotif
69 HasPoll use poll() syscall?
70 HasPurify boolean for system has Purify
71 HasPutenv boolean for libc has putenv()
72 HasSecureRPC boolean for Sun Secure RPC
73 HasSetProcTitle boolean for setproctitle()
74 HasSetUserContext boolean for setusercontext()
75 HasSentinel boolean for system has Sentinel available
76 HasSharedLibraries boolean for system has shared libraries
77 HasShm boolean for System V shared memory
78 HasSockets boolean for system has BSD sockets
79 HasStrcasecmp boolean for system implements str[n]casecmp
80 HasSymLinks boolean for system has symbolic links
81 HasTestCenter boolean for system has TestCenter
82 HasVarDirectory boolean for system has /var
83 HasVFork boolean for system has vfork()
84 HasVoidSignalReturn boolean for POSIX signal() procs
85 IncludeSharedObjectInNormalLib define for static libs to include
86 -fPIC objects on relevant archs
87 IncRoot parent of X11 include directory
88 InstBinFlags install flags for binaries
89 InstDatFlags install flags for data files
90 InstIncFlags install flags for header files
91 InstKmemFlags install flags for xload to get at /dev/kmem
92 InstLibFlags install flags for libraries
93 InstManFlags install flags for manual pages
94 InstPgmFlags install flags for normal programs
95 InstUidFlags install flags for xterm to chown /dev/ptys
96 InstallCmd command to install files
97 LdCmd command to run loader
98 LdCombineFlags flags for incremental loading
99 LexCmd command to run lex
100 LexLib library for programs using lex output
101 LintCmd command to run lint
102 LintLibFlag flags to generate lint libraries
103 LintOpts lint options to control strictness
104 LnCmd command to link two files
105 LoaderLibPrefix loader flags before libraries
106 LocalRulesFile site-specific file with additional imake rules
107 LocalTmplFile file with additional imake variables
108 MacroFile name of machine-dependent config params file
109 MacroIncludeFile <MacroFile>
110 MakeCmd command to run make
111 Malloc0ReturnsNull boolean for malloc(0) == NULL
112 Malloc0ReturnsNullDefines -D's to build libX11/libXt
113 MathLibrary library for programs using C math functions
114 MkCookieCmd command to generate an xauth cookie
115 MsMacros macro flag for TroffCmd, normally "-ms"
116 MvCmd command to rename a file
117 NeedConstPrototoypes whether const is supported
118 NeedFunctionPrototypes whether or not to force function prototypes
119 NeedNestedPrototypes whether nested prototypes are supported
120 NeedVarargsPrototypes whether varargs prototypes are supported
121 NeedWidePrototypes whether or not to widen function prototypes
122 NoOpCDebugFlags C compiler flags to not debug or optimize
123 NoRConst YES if const for structs of funcs is bad
124 OSMajorVersion major version number of operating system
125 OSMinorVersion minor version number of operating system
126 OSName operating system name
127 OSTeenyVersion maintenance version number of operating system
128 OptimizedCDebugFlags C compiler flags to turn on optimization
129 XtPopdownConformance XtPopdown conformans to the specification
130 PreProcessCmd command to run /lib/cpp on scripts
131 RanlibCmd command to clean up libraries
132 RanlibInstFlags flags to ranlib after copying
133 ResourceConfigurationManagement boolean for Xt's Resource Configuration
134 Management
135 RmCmd command to delete files
136 ShLibDir directory in which to install shared libraries
137 StandardCppDefines -D's for running cpp
138 StandardDefines -D's for running C compiler
139 StandardIncludes -I's for running C compiler
140 StripInstalledPrograms boolean for sites that want to install -s
141 SystemV boolean for systems that are at least SVR2
142 SystemV4 boolean for SVR4 systems
143 TOPDIR relative path to top of sources
144 TagsCmd command to run tags
145 TblCmd command to run tbl
146 TroffCmd command to run troff to get PostScript
147 UNCOMPRESSPATH command to run uncompress (obsolete)
148 UnalignedReferencesAllowed boolean for unaligned copies ok
149 UsrLibDir directory in which to install libraries
150 YaccCmd command to run yacc
151 UseTIRPC force usage of libtirpc
152
153 X11.tmpl provides defaults for the following variables:
154
155 AdmDir directory containing system log files
156 AllocateLocalDefines -D's to turn on alloca() (should be in Imake.tmpl)
157 BDFTOSNFFILT command to run bdftosnf
158 BaseExtensionDefines universal extensions to use
159 BinDir directory in which to install programs
160 BuildDBE build DOUBLE-BUFFER extension
161 BuildDPMS build Display Power Management Signaling extension
162 BuildIncRoot relative path to location of headers in build
163 BuildIncTop path from build includes directory to top
164 BuildPlugin build xrx plug-in for web browsers
165 BuildRECORD Build RECORD extension
166 BuildServer build X server
167 BuildXCSecurity Build Security Extension
168 BuildXInputExt build X Input extension (requires ddx support,
169 which exists only in Xhp and XFree86)
170 BuildXKB build X Keyboard Extension?
171 BuildXKBlib build X Keyboard Extension into Xlib?
172 UseXKBInClients Use XKB functions in normal clients?
173 ConfigDir install directory for config files
174 ConnectionFlags -D's for supported transports
175 ContribDir location of user-contributed sources
176 DebugLibX11 build libX11_d.a
177 DefaultCursorTheme name of default cursor theme
178 DefaultFontPath default server font path
179 DefaultSystemPath default system xdm PATH environment variable
180 DefaultSystemShell default /bin/sh
181 DefaultUserPath default user xdm PATH environment variable
182 DependCmd command to run makedepend
183 DependDir build directory containing makedepend program
184 DriverManDir directory in which to install driver man pages
185 DriverManSuffix man suffix for driver pages
186 ExtensionDefines -D's for universal extensions
187 ExtensionOSDefines -D's for additional extensions
188 ForceNormalLib force building of .a in addition to shared lib
189 HasXdmAuth boolean for using XDM-AUTHORIZATION-1;
190 needs Wraphelp.c, see Release Notes
191 InstallLibManPages boolean for installing library man pages
192 InstallSecurityConfig install server security policy file over old?
193 LibDir directory in which to install X11 support files
194 LibManSuffix man suffix for library pages
195 LibmanDir directory in which to install library man pages
196 LintlibDir directory in which to install lint libs
197 ManDir directory in which to install program man pages
198 ManDirectoryRoot parent of man directories relative to root
199 ManPath full path of parent directory
200 ManSourcePath common prefix of man page directories
201 ManSuffix man suffix for programs
202 MiscManSuffix man suffix for miscellaneous pages
203 MiscManDir directory in which to install misc man pages
204 NeedDefaultDepLibs boolean for enabling default DEPLIBS
205 NlsDir directory in which to install nls files
206 NormalLibX11 build libX11.a
207 OsNameDefines If uname(2) unavailable, set to -DOS_NAME=OSName
208 PrimaryScreenResolution resolution of default server screen
209 ProfileLibX11 build libX11_p.a
210 ProjectX version indicating this is the X Window System
211 RemoveTargetProgramByMoving boolean for rm -f that doesn't
212 SHELLPATH -D for /bin/sh
213 ServerConfigDir directory for server security config files
214 ServerDefines complete -D's for server
215 ServerExtraDefines special -D's for server
216 ServerOSDefines OS -D's for server
217 ServerAssertDefines -DNDEBUG for no assertions, /**/ for assertions
218 SharedLibX11 boolean for making sharable libX11.so
219 ShmDefines MIT-SHM define
220 TwmDir directory in which to install twm config files
221 UseCCMakeDepend boolean for using alternate makedepend script
222 VarDirectory directory in /var for logs, etc., and config
223 VendorHasX11R6_3libXext don't need Security & AppGroup in xrx plug-in
224 XAppLoadDir directory in which to install app defaults
225 XFileSearchPathBase base file search path
226 XFileSearchPathDefault default path to search for app defaults files
227 XInputDefines XINPUT define
228 XMalloc0ReturnsNullDefines -D's specifically for libX11
229 XdmConfigurationSubdirectory name of default xdm configuration
230 XdmDir directory in which to install xdm files
231 XinitDir directory in which to install xinit files
232 XmanLocalSearchPath non-standard path for man pages
233 XtErrorPrefix leading text in XtError() msg; eg. 'X Toolkit '
234 XtWarningPrefix leading text in XtWarning()msg, same as above
235 XtMalloc0ReturnsNullDefines -D's specifically for libXt
236 ZBDFTOSNFFILT -D to run uncompress and bdftosnf (obsolete)
237
238
239 Library.tmpl provides defaults for the following variables:
240
241 AvoidNullMakeCommand for makes that spout about $(_NULLCMD_)
242 LibraryCCOptions special C compiler options for libraries
243 LibraryCDebugFlags library debug/optimize flags to override defs
244 LibraryCcCmd command to run C compiler in libraries
245 LibraryCplusplusOptions special C++ options for libraries
246 LibraryCplusplusDebugFlags library debug/optimize flags for C++
247 LibraryCplusplusCmd command to run C++ compiler in libraries
248 LibraryDefines -D's for libraries
249 SeparateSharedCompile shared and unshared libs use same binaries?
250
251
252 Server.tmpl provides defaults for the following variables:
253
254 ServerCCOptions server C compiler options to override defaults
255 ServerCcCmd command to run C compiler in server
256 ServerCDebugFlags server debug/opt compiler flags
257 ServerDefines server standard -D's
258 InstallServerSetUID does this system need X server suid to root?
259
260
261 Threads.tmpl provides defaults for the following variables:
262
263 LocalThreads whether to enable multi-threading support
264 LocalThreadsDefines -D flags needed in this directory
265
266
267 An <os>Lib.rules file provides defaults for the following variables:
268
269 HasSharedLibraries boolean for using shared libraries
270 SharedDataSeparation boolean indicating separate data/code
271 SharedCodeDef -D's for compiling shared library files
272 SharedLibraryDef -D's for defining which kind of shared lib
273 ShLibIncludeFile location of the <os>Lib.tmpl file
274 SharedLibraryLoadFlags loader flags when making the library
275 UseExportLists boolean for using an export list
276 PositionIndependentCFlags PIC compiler flags for C
277 PositionIndependentCplusplusFlags PIC compiler flags for C++
278
279 Note: PositionIndependentCplusplusFlags is only required if the
280 C and C++ compilers use different flags to build PIC code. The
281 default configuration will try to use PositionIndependentCFlags
282 for both C and C++ compiles.
283
284 An <os>Lib.tmpl file provides defaults for the following variables:
285
286 SharedX11Reqs required libs for libX11.so
287 SharedX11Rev version number for libX11.so
288
289 Vendor.cf files and/or site/host specific .def files may define the
290 following variables:
291
292 ProjectRoot The directory under which the installation
293 will operate. This value will be hard coded
294 into some programs. As a result do not use it
295 to specify the installation directory for a
296 cross compiled system, use DESTDIR to
297 accomplish that task.
298
299 The following variables are used by some part of the tree:
300
301 AckToolset programs/Xserver/hw/xfree86
302 BuildChooser build the xdm chooser program?
303 SharedLibXdmGreet use xdm shared dynamic greeter library?
304 LatexCmd command to run LaTeX on a document
305 DvipsCmd command to turn .dvi file into PostScript
306 MotifBC using Motif 1.1.1, 1.1.2, or 1.1.3?
307 GetValuesBC compat GetValues behavior for broken apps?
308 SvgaConfig default SVGA configuration
309 HasGetReturnAddress util/memleak
310 HasShadowPasswd system has getspnam() function
311 WebServer host:port of your Web server (see programs/xrx)
312 HtmlDir path used by Web server for HTML and RX docs
313 CgiBinDir path used by Web server for CGI programs
314 ProxyManager ICE network ID to contact a running proxymngr
315
316
317 Make Variables
318
319 The following make variables are used by imake rules and may be set in
320 an individual Imakefile.
321
322 DEFINES program-specific -D flags and other arguments
323 to pass to the C compiler, lint, and makedepend.
324 DEPEND_DEFINES program-specific flags in addition to
325 $(DEFINES) to pass to lint and makedepend.
326 This is usually used when there are special
327 compilation rules for individual files, and
328 the defines passed to those files affect
329 makedepend results. If they can be passed to
330 all files during the makedepend step without
331 affecting the results for other files,
332 DEPEND_DEFINES is used to do that. Example is
333 the Xlib Imakefile.
334 INCLUDES program-specific -I flags.
335 HEADERS .h files to install with "make includes" and
336 "make install". If this Imakefile includes
337 Library.tmpl there are no headers, include
338 this line instead of a HEADERS definition:
339 #define LibHeaders NO
340 REQUIREDLIBS when building a shared library, other libraries used
341 by this library that should be referenced at
342 link time.
343 LINTLIBS program-specific libraries for lint.
344 LOCAL_LDFLAGS program-specific flags for the linker.
345 LOCAL_LIBRARIES project libraries (usually specified
346 as -lname) needed by this program.
347 For example, "-lXt -lXext -lX11".
348 Used by SimpleProgramTarget and
349 ComplexProgramTarget* rules.
350 Do not include any system-specific libraries here.
351 SYS_LIBRARIES system libraries (usually specified
352 as -lname) needed by this program.
353 For example "MathLibrary".
354 Do not include any system-specific libraries
355 such as "-lnsl" here; they are automatically
356 added to the link command by the
357 vendor-specific .cf file.
358 SUBDIRS for an Imakefile in a directory containing
359 subdirectories, this names the subdirectories.
360 Such an Imakefile also needs to #define IHaveSubdirs
361 and call MakeSubdirs() and DependSubdirs().
362 MANSUFFIX suffix used by InstallManPage* rules.
363 May be set to $(LIBMANSUFFIX), $(FILEMANSUFFIX), or
364 $(MISCMANSUFFIX) in directories for libraries or data
365 files.
366
367
368 Rule-specific variables that may be set in an individual Imakefile.
369 If you aren't using these rules, you may need variables with a similar
370 function, but you need not use these names. However, following these
371 conventions may make your Imakefile easier to read and maintain.
372
373 DEPLIBS library dependencies for ComplexProgramTarget
374 SRCS source files used by ComplexProgramTarget and
375 DependTarget.
376 OBJS object files used by ComplexProgramTarget
377 PROGRAMS default target used with ComplexProgramTarget_(n)
378 SRCS1 source files used by ComplexProgramTarget_1
379 OBJS1 object files used by ComplexProgramTarget_1
380 DEPLIBS1 library dependencies for ComplexProgramTarget_1
381 SRCS2 source files used by ComplexProgramTarget_2
382 OBJS2 object files used by ComplexProgramTarget_2
383 DEPLIBS2 library dependencies for ComplexProgramTarget_2
384 SRCS3 source files used by ComplexProgramTarget_3
385 OBJS3 object files used by ComplexProgramTarget_3
386 DEPLIBS3 library dependencies for ComplexProgramTarget_3
387
388 Variables that can be set on the make command line:
389
390 DESTDIR directory under which "make install" should
391 install instead of "/"; used only for testing
392 "make install" rules, binary package building,
393 and specifying alternative installation directories
394 for cross compiles.
395 FILE file for "lint1" target to run lint on.
396 CDEBUGFLAGS -g and/or -O flag to control C compiler optimization.
397 CXXDEBUGFLAGS -g and/or -O flag to control C++ optimization.
398 LDSTRIPFLAGS flag to have linker strip objects (typically -x).
399 Typically set to the empty string to prevent
400 the linker from stripping objects; use this
401 way when setting CDEBUGFLAGS to "-g".
402
403 These variables are set in project-specific files such as X11.tmpl.
404 They should NOT be set in an Imakefile. These variables are sometimes
405 misused; they are included here to remind Imakefile writers NOT to use
406 them:
407
408 EXTRA_DEFINES project-specific -D flags
409 EXTRA_INCLUDES project-specific -I flags
410 EXTRA_ICONFIGFILES Additional project-specific imake config files
411 to add to ICONFIGFILES.
412 This is a list of files that define variables
413 that might affect compilation of some files.
414
415 Many other make variables are set up by the imake config files and can
416 be used in an Imakefile. The easiest way to discover them is to look
417 at the Makefile generated by an empty Imakefile.
418
419
420 Comments
421
422 Use C comment syntax in an Imakefile for comments that should not
423 appear in the resulting Makefile.
424 Use "XCOMM" at the start of each
425 line to produce a comment that will appear in the Makefile.
426 (The "XCOMM" will
427 be translated into the Makefile comment character "#" by imake.)
428 Do NOT use "#" as a comment character in Imakefiles; it confuses the C
429 preprocessor used by imake on some systems.
430
431
432 Imake variables
433
434 Don't abuse the variables in X11.tmpl that describe
435 particular pieces of X by using them to describe your own subsystems.
436 Instead, create new variables that are defaulted using
437 Imake.tmpl variables.
438
439
440 Examples
441
442 Since the easiest way to write an Imakefile is to start with one that
443 works, here are some short, easy-to-read Imakefile examples in the X
444 distribution:
445
446 with subdirs: config/Imakefile
447 library: lib/Xau/Imakefile
448 simple program: programs/xdpyinfo/Imakefile
449 complex progs: programs/xclipboard/Imakefile
450 complex prog: programs/xmodmap/Imakefile
451
452 Common Rules
453
454 Here are some of the common rules for building programs. How to use
455 them is described in Imake.rules and in the O'Reilly book "Software
456 Portability with imake."
457
458 Basic program-building rules
459
460 All of these except NormalProgramTarget also generate rules to install
461 the program and its manual page, and to generate dependencies.
462
463 SimpleProgramTarget Use if there is only one program to be made
464 and it has only one source file.
465
466 ComplexProgramTarget Use if there is only one program to be made
467 and it has multiple source files. Set SRCS to
468 the names of the source files, set OBJS to
469 the names of the object files, and set DEPLIBS
470 to the libraries that this program depends on.
471
472 ComplexProgramTarget_1 Like ComplexProgramTarget, but uses SRCS1,
473 OBJS1, and DEPLIBS1 and can be used with
474 ComplexProgramTarget_2 and ComplexProgramTarget_3
475 to build up to three programs in the same directory.
476 Set PROGRAMS to the programs built by all of
477 these rules. For more than 3 programs, use
478 NormalProgramTarget for each.
479 ComplexProgramTarget_2 Use after ComplexProgramTarget_1 for the
480 second program in a directory. Uses SRCS2,
481 OBJS2, and DEPLIBS2.
482 ComplexProgramTarget_3 Use after ComplexProgramTarget_2 for the
483 third program in a directory. Uses SRCS3,
484 OBJS3, and DEPLIBS3.
485
486 NormalProgramTarget Build a program. Can be used multiple times
487 with different arguments in the same Imakefile.
488
489 Lower level rules, often used with NormalProgramTarget
490
491 InstallProgram install a program.
492
493 InstallManPage install a manual page.
494
495 InstallDirectory install a directory.
496
497 DependTarget() include once at end of Imakefile with
498 NormalProgramTarget rules or that uses Library.tmpl.
499 Generates dependencies for files named in SRCS.
500
501 Manual page rules, commonly used only in special documentation directories:
502
503 InstallManPage
504 InstallManPageLong
505 InstallManPageAliases
506
507 Other rules:
508
509 SpecialCObjectRule Compile a C file with special flags.
510 AllTarget Declare additional targets to build.
511 InstallAppDefaults Install X application defaults file.
512
513 Imakefile for directory with subdirectories
514
515 XCOMM this is a sample Imakefile for a directory containing subdirectories
516 #define IHaveSubdirs
517 #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"
518 SUBDIRS = list of subdirs ...
519 MakeSubdirs($(SUBDIRS))
520 DependSubdirs($(SUBDIRS))
521
522
523 Common Targets
524
525 These targets are typically NOT defined explicitly by the Imakefile
526 writer; rather they are generated automatically by imake rules.
527 They are listed here for the convenience of people using the resulting
528 Makefile, not people writing the original Imakefile.
529
530 all Default rule; builds whatever is in this directory.
531 Makefile Remake the Makefile (use after changing Imakefile).
532 Run "make depend" after.
533 Makefiles Remake all Makefiles in subdirectories. (Does
534 nothing if no subdirectories.)
535 Run "make depend" after.
536 includes Generate and install in the tree any necessary
537 header files.
538 depend Update dependencies in the Makefile calculated
539 by examining the source files.
540 install Install what "make all" built on the system.
541 install.man Install manual pages.
542 clean Remove built objects and other derived files.
543 lint Run lint.
544 tags Create a tags file.