📄 readme
字号:
SeparateSharedCompile shared and unshared libs use same binaries?Server.tmpl provides defaults for the following variables: ServerCCOptions server C compiler options to override defaults ServerCcCmd command to run C compiler in server ServerCDebugFlags server debug/opt compiler flags ServerDefines server standard -D's InstallServerSetUID does this system need X server suid to root?Threads.tmpl provides defaults for the following variables: LocalThreads whether to enable multi-threading support LocalThreadsDefines -D flags needed in this directoryAn <os>Lib.rules file provides defaults for the following variables: HasSharedLibraries boolean for using shared libraries SharedDataSeparation boolean indicating separate data/code SharedCodeDef -D's for compiling shared library files SharedLibraryDef -D's for defining which kind of shared lib ShLibIncludeFile location of the <os>Lib.tmpl file SharedLibraryLoadFlags loader flags when making the library UseExportLists boolean for using an export list PositionIndependentCFlags PIC compiler flags for C PositionIndependentCplusplusFlags PIC compiler flags for C++ Note: PositionIndependentCplusplusFlags is only required if the C and C++ compilers use different flags to build PIC code. The default configuration will try to use PositionIndependentCFlags for both C and C++ compiles.An <os>Lib.tmpl file provides defaults for the following variables: SharedFSReqs required libs for libFS.so SharedFSRev version number for libFS.so SharedICEReqs required libs for libICE.so SharedICERev version number for libICE.so SharedOldXReqs required libs for liboldX.so SharedOldXRev version number for liboldX.so SharedPexReqs required libs for libPEX5.so SharedPexRev version number for libPEX5.so SharedSMReqs required libs for libSM.so SharedSMRev version number for libSM.so SharedX11Reqs required libs for libX11.so SharedX11Rev version number for libX11.so SharedXauReqs required libs for libXau.so SharedXauRev version number for libXau.so SharedXawReqs required libs for libXaw.so SharedXawRev version number for libXaw.so SharedXdmcpReqs required libs for libXdmcp.so SharedXdmcpRev version number for libXdmcp.so SharedXextReqs required libs for libXext.so SharedXextRev version number for libXext.so SharedXiReqs required libs for libXi.so SharedXiRev version number for libXi.so SharedXieReqs required libs for libXie.so SharedXieRev version number for libXie.so SharedXmuReqs required libs for libXmu.so SharedXmuRev version number for libXmu.so SharedXtReqs required libs for libXt.so SharedXtRev version number for libXt.so SharedXtstReqs required libs for libXtst.so SharedXtstRev version number for libXtst.so SharedXmReqs required libs for libXm.so SharedXmRev version number for libXm.so SharedMrmReqs required libs for libMrm.so SharedMrmRev version number for libMrm.so SharedUilReqs required libs for libUil.so SharedUilRev version number for libUil.so SharedTtReqs required libs for libtt.so SharedTtRev version number for libtt.so SharedPamReqs required libs for libpam.so SharedPamRev version number for libpam.so SharedDtSvcReqs required libs for libDtSvc.so SharedDtSvcRev version number for libDtSvc.so SharedDtSearchReqs required libs for libDtSearch.so SharedDtSearchRev version number for libDtSearch.so SharedDtWidgetReqs required libs for libDtWidget.so SharedDtWidgetRev version number for libDtWidget.so SharedDtHelpReqs required libs for libDtHelp.so SharedDtHelpRev version number for libDtHelp.so SharedDtPrintReqs required libs for libDtPrint.so SharedDtPrintRev version number for libDtPrint.so SharedDtTermReqs required libs for libDtTerm.so SharedDtTermRev version number for libDtTerm.so SharedDtMrmReqs required libs for libDtMrm.so SharedDtMrmRev version number for libDtMrm.soThe following variables are used by some part of the tree: AckToolset programs/Xserver/hw/xfree86 BuildChooser build the xdm chooser program? SharedLibXdmGreet use xdm shared dynamic greeter library? LatexCmd command to run LaTeX on a document DvipsCmd command to turn .dvi file into PostScript MotifBC using Motif 1.1.1, 1.1.2, or 1.1.3? GetValuesBC compat GetValues behavior for broken apps? NeedBerklib application needs libXbsd? SvgaConfig default SVGA configuration HasGetReturnAddress util/memleak HasShadowPasswd system has getspnam() function XnestServer build X server with Xlib-based ddx XVirtualFramebufferServer build X server with virtual memory framebuffer XpRasterDDX include the raster print ddx driver XpColorPclDDX include the color PCL print ddx driver XpMonoPclDDX include the monochrome PCL print ddx driver XpPostScriptDDX include the PostScript print ddx driver WebServer host:port of your Web server (see programs/xrx) HtmlDir path used by Web server for HTML and RX docs CgiBinDir path used by Web server for CGI programs ProxyManager ICE network ID to contact a running proxymngrMake VariablesThe following make variables are used by imake rules and may be set inan individual Imakefile.DEFINES program-specific -D flags and other arguments to pass to the C compiler, lint, and makedepend.DEPEND_DEFINES program-specific flags in addition to $(DEFINES) to pass to lint and makedepend. This is usually used when there are special compilation rules for individual files, and the defines passed to those files affect makedepend results. If they can be passed to all files during the makedepend step without affecting the results for other files, DEPEND_DEFINES is used to do that. Example is the Xlib Imakefile.INCLUDES program-specific -I flags.HEADERS .h files to install with "make includes" and "make install". If this Imakefile includes Library.tmpl there are no headers, include this line instead of a HEADERS definition: #define LibHeaders NOREQUIREDLIBS when building a shared library, other libraries used by this library that should be referenced at link time.LINTLIBS program-specific libraries for lint.LOCAL_LDFLAGS program-specific flags for the linker.LOCAL_LIBRARIES project libraries (usually specified as -lname) needed by this program. For example, "-lXt -lXext -lX11". Used by SimpleProgramTarget and ComplexProgramTarget* rules. Do not include any system-specific libraries here.SYS_LIBRARIES system libraries (usually specified as -lname) needed by this program. For example "MathLibrary". Do not include any system-specific libraries such as "-lnsl" here; they are automatically added to the link command by the vendor-specific .cf file.SUBDIRS for an Imakefile in a directory containing subdirectories, this names the subdirectories. Such an Imakefile also needs to #define IHaveSubdirs and call MakeSubdirs() and DependSubdirs().MANSUFFIX suffix used by InstallManPage* rules. May be set to $(LIBMANSUFFIX) or $(FILEMANSUFFIX) in directories for libraries or data files.Rule-specific variables that may be set in an individual Imakefile.If you aren't using these rules, you may need variables with a similarfunction, but you need not use these names. However, following theseconventions may make your Imakefile easier to read and maintain.DEPLIBS library dependencies for ComplexProgramTargetSRCS source files used by ComplexProgramTarget and DependTarget.OBJS object files used by ComplexProgramTargetPROGRAMS default target used with ComplexProgramTarget_(n)SRCS1 source files used by ComplexProgramTarget_1OBJS1 object files used by ComplexProgramTarget_1DEPLIBS1 library dependencies for ComplexProgramTarget_1SRCS2 source files used by ComplexProgramTarget_2OBJS2 object files used by ComplexProgramTarget_2DEPLIBS2 library dependencies for ComplexProgramTarget_2SRCS3 source files used by ComplexProgramTarget_3OBJS3 object files used by ComplexProgramTarget_3DEPLIBS3 library dependencies for ComplexProgramTarget_3Variables that can be set on the make command line:DESTDIR directory under which "make install" should install instead of "/"; used only for testing "make install" rules.FILE file for "lint1" target to run lint on.CDEBUGFLAGS -g and/or -O flag to control C compiler optimization.CXXDEBUGFLAGS -g and/or -O flag to control C++ optimization.LDSTRIPFLAGS flag to have linker strip objects (typically -x). Typically set to the empty string to prevent the linker from stripping objects; use this way when setting CDEBUGFLAGS to "-g".These variables are set in project-specific files such as X11.tmpl.They should NOT be set in an Imakefile. These variables are sometimesmisused; they are included here to remind Imakefile writers NOT to usethem:EXTRA_DEFINES project-specific -D flagsEXTRA_INCLUDES project-specific -I flagsEXTRA_ICONFIGFILES Additional project-specific imake config files to add to ICONFIGFILES. This is a list of files that define variables that might affect compilation of some files.Many other make variables are set up by the imake config files and canbe used in an Imakefile. The easiest way to discover them is to lookat the Makefile generated by an empty Imakefile.CommentsUse C comment syntax in an Imakefile for comments that should notappear in the resulting Makefile.Use "XCOMM" at the start of eachline to produce a comment that will appear in the Makefile.(The "XCOMM" willbe translated into the Makefile comment character "#" by imake.)Do NOT use "#" as a comment character in Imakefiles; it confuses the Cpreprocessor used by imake on some systems.Imake variablesDon't abuse the variables in X11.tmpl that describeparticular pieces of X by using them to describe your own subsystems.Instead, create new variables that are defaulted usingImake.tmpl variables.ExamplesSince the easiest way to write an Imakefile is to start with one thatworks, here are some short, easy-to-read Imakefile examples in the Xdistribution:with subdirs: config/Imakefilelibrary: lib/Xau/Imakefilesimple program: programs/xdpyinfo/Imakefilecomplex progs: programs/xclipboard/Imakefilecomplex prog: programs/xmodmap/ImakefileCommon RulesHere are some of the common rules for building programs. How to usethem is described in Imake.rules and in the O'Reilly book "SoftwarePortability with imake."Basic program-building rulesAll of these except NormalProgramTarget also generate rules to installthe program and its manual page, and to generate dependencies.SimpleProgramTarget Use if there is only one program to be made and it has only one source file.ComplexProgramTarget Use if there is only one program to be made and it has multiple source files. Set SRCS to the names of the source files, set OBJS to the names of the object files, and set DEPLIBS to the libraries that this program depends on.ComplexProgramTarget_1 Like ComplexProgramTarget, but uses SRCS1, OBJS1, and DEPLIBS1 and can be used with ComplexProgramTarget_2 and ComplexProgramTarget_3 to build up to three programs in the same directory. Set PROGRAMS to the programs built by all of these rules. For more than 3 programs, use NormalProgramTarget for each.ComplexProgramTarget_2 Use after ComplexProgramTarget_1 for the second program in a directory. Uses SRCS2, OBJS2, and DEPLIBS2.ComplexProgramTarget_3 Use after ComplexProgramTarget_2 for the third program in a directory. Uses SRCS3, OBJS3, and DEPLIBS3.NormalProgramTarget Build a program. Can be used multiple times with different arguments in the same Imakefile.Lower level rules, often used with NormalProgramTargetInstallProgram install a program.InstallManPage install a manual page.DependTarget() include once at end of Imakefile with NormalProgramTarget rules or that uses Library.tmpl. Generates dependencies for files named in SRCS.Manual page rules, commonly used only in special documentation directories:InstallManPageInstallManPageLongInstallManPageAliasesOther rules:SpecialCObjectRule Compile a C file with special flags.AllTarget Declare additional targets to build.InstallAppDefaults Install X application defaults file.Imakefile for directory with subdirectoriesXCOMM this is a sample Imakefile for a directory containing subdirectories#define IHaveSubdirs#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"SUBDIRS = list of subdirs ...MakeSubdirs($(SUBDIRS))DependSubdirs($(SUBDIRS))Common TargetsThese targets are typically NOT defined explicitly by the Imakefilewriter; rather they are generated automatically by imake rules.They are listed here for the convenience of people using the resultingMakefile, not people writing the original Imakefile.all Default rule; builds whatever is in this directory.Makefile Remake the Makefile (use after changing Imakefile). Run "make depend" after.Makefiles Remake all Makefiles in subdirectories. (Does nothing if no subdirectories.) Run "make depend" after.includes Generate and install in the tree any necessary header files.depend Update dependencies in the Makefile calculated by examining the source files.install Install what "make all" built on the system.install.man Install manual pages.clean Remove built objects and other derived files.lint Run lint.tags Create a tags file.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -