📄 makefiles.4
字号:
target machine (e.g..IR "sun3 sun4 ip22 i86pc i586 9000\-725 aviion" ).It is set to the output of.I "archconverted to lower case.On systems, where .I M_ARCHis not available, it is set to the content of .IR K_ARCH ..brDo not change this macro...TPMK_FILESmakefiles that divert into sub makes within the same directorymust set .I MK_FILESto be a list of makefile names for the sub makes.Makefile names for sub makes should have a name that is buildby adding .I .mkto the base name of the target that is defined inside thespecific makefile...TPMAKEPROGSet this macro to the name of your make program if it doesnot support the macro.IR MAKE_NAME .The make program .I smakeis able to identify itself.If you want to use a make program that is not ableto identify itselfand it's name is not.IR make ,set .I MAKEPROGto the name of the make program.Currently only .I gmakeis supported as alternate value for .IR MAKEPROG .If you want to use an unsupported make programyou have to check if it supports the needed featuresfor.IR makefiles .You must write your own rule files for that make program.If you want to use .IR gmake ,you should do.B "setenv MAKEPROG gmakebefore you start.I gmakeor use a shell script that does this job for you...TPMAKEThis macro is set up by the .I make program.It contains a path name that is sufficient to recursivelycall the same .I makeprogram again (either that last path component or the full pathname of the make program)..brDo not change this macro...TPMAKEFLAGSThis macro is set up by the .I make program.It contains the command line flags,.I makeis called with..brDo not change this macro...TPMAKE_ARCHThis macro is currently set up by .B smake only.It contains the processor architecture of the target machine(e.g. mc68020, sparc, pentium)..brDo not change this macro...TPMAKE_BRANDThis macro is currently set up by .B smake only.It contains the brand of the target machine(e.g. Sun_Microsystems(e.g. )..brDo not change this macro...TPMAKE_HOSTThis macro is currently set up by .B smake only.It contains the host name of the target machine(e.g. duffy, sherwood, ghost)..brDo not change this macro...TPMAKE_MACHThis macro is currently set up by .B smake only.It contains the kernel architecture of the target machine(e.g. sun3, sun4c, sun4m, sun4u)..brDo not change this macro...TPMAKE_MODELThis macro is currently set up by .B smake only.It contains the model name of the target machine(e.g. SUNW,SPARCstation-20)..brDo not change this macro...TPMAKE_M_ARCHThis macro is currently set up by .B smake only.It contains the machine architecture of the target machine(e.g. sun3, sun4)..brDo not change this macro...TPMAKE_NAMEThis macro is currently set up by .B smake only.It contains the official name of themake program(e.g. make, smake, gmake)..brDo not change this macro...TPMAKE_OSThis macro is currently set up by .B smake only.It contains the operating system name of the target machine(e.g. sunos, linux, dgux)..brDo not change this macro...TPMAKE_OSDEFSThis macro is currently set up by .B smake only.It contains operating system specific defines for the compiler(e.g. -D__SVR4)..brDo not change this macro...TPMAKE_OSRELThis macro is currently set up by .B smake only.It contains the operating system release name of the target machine(e.g. 5.5, 4.1.1)..brDo not change this macro...TPMAKE_OSVERSIONThis macro is currently set up by .B smake only.It contains the operating system version of the target machine(e.g. generic)..brDo not change this macro...TPMAKE_SERIALThis macro is currently set up by .B smake only.It contains the serial number of the target machine(e.g. 1920098175)..brDo not change this macro...TPMANDIRall makefiles for manual pages must set this macro to thepath name relative to .I INS_BASEwhere the manual page root dir for the project should be.Possible values for english manual pages are.IR man " or " share/man ,possible values for german manual pages are.IR man/de " or " share/man/de ...TPMANFILEmakefiles for manual pages set this macro to the name of the troff source file for the manual page..TPMANSECTmakefiles for manual pages set this macro to the macro name thatcontains the real section name for this manual page. This is necessary because bsd based system have different naming conventions thansystem V based systems. See below for a valid list of manual sectionmacros..TPMANSECT_ADMINThis macro contains the name of the sub directory for administrativecommands and maintenance procedures..brDo not change this macro..TPMANSECT_CMDThis macro contains the name of the sub directory for general user commands..brDo not change this macro..TPMANSECT_DEMOSThis macro contains the name of the sub directory for democommands..brDo not change this macro..TPMANSECT_DEVICEThis macro contains the name of the sub directory for user level device interfaces..brDo not change this macro..TPMANSECT_DRIVERThis macro contains the name of the sub directory for kernel level device driver interfaces..brDo not change this macro..TPMANSECT_FILEFORMThis macro contains the name of the sub directory for file formats..brDo not change this macro..TPMANSECT_GAMESThis macro contains the name of the sub directory for games..brDo not change this macro..TPMANSECT_HDRThis macro contains the name of the sub directory for header files..brDo not change this macro..TPMANSECT_LIBThis macro contains the name of the sub directory for library function interfaces..brDo not change this macro..TPMANSECT_MACROSThis macro contains the name of the sub directory for troff macros..brDo not change this macro..TPMANSECT_NETWORKThis macro contains the name of the sub directory for user level network interfaces..brDo not change this macro..TPMANSECT_SYSCALLThis macro contains the name of the sub directory for system call interfaces.Do not change this macro..TPMANSECT_TABLESThis macro contains the name of the sub directory for tables.Do not change this macro..TPMANSTYLEThis macro contains the name that is used to find the rightordering conventions for manual pages.Do not change this macro..TPMANSUFFIXmakefiles for manual pages set this macro to the macro name thatcontains the real suffix for this manual page. This is necessary because bsd based system have different naming conventions thansystem V based systems. See below for a valid list of manual suffixmacros..TPMANSUFF_ADMINThis macro contains the name of the file suffix for administrativecommands and maintenance procedures..brDo not change this macro..TPMANSUFF_CMDThis macro contains the name of the file suffix for general user commands..brDo not change this macro..TPMANSUFF_DEMOSThis macro contains the name of the file suffix for democommands..brDo not change this macro..TPMANSUFF_DEVICEThis macro contains the name of the file suffix for user level device interfaces..brDo not change this macro..TPMANSUFF_DRIVERThis macro contains the name of the file suffix for kernel level device driver interfaces..brDo not change this macro..TPMANSUFF_FILEFORMThis macro contains the name of the file suffix for file formats..brDo not change this macro..TPMANSUFF_GAMESThis macro contains the name of the file suffix for games..brDo not change this macro..TPMANSUFF_HDRThis macro contains the name of the file suffix for header files..brDo not change this macro..TPMANSUFF_LIBThis macro contains the name of the file suffix for library function interfaces..brDo not change this macro..TPMANSUFF_MACROSThis macro contains the name of the file suffix for troff macros..brDo not change this macro..TPMANSUFF_NETWORKThis macro contains the name of the file suffix for user level network interfaces..brDo not change this macro..TPMANSUFF_SYSCALLThis macro contains the name of the file suffix for system call interfaces.Do not change this macro..TPMANSUFF_TABLESThis macro contains the name of the file suffix for tables.Do not change this macro..TPMARCHthis macro contains the machine architecture for thetarget machine (e.g..IR "sun3 sun4 ip22 i86pc i586 9000\-725 aviion" ).It is set to the output of.I "archconverted to lower case.On systems, where .I M_ARCHis not available, it is set to the content of .IR K_ARCH ..brDo not change this macro unless you want to do a cross compilation...TPO_ARCHthis macro contains the name of the operating systemconverted to lower case.It is usually the output of:.IR "uname \-s" .It may contain a modified name if the compilation rulesfor different version of the operating system differ (e.g.on.IR SunOS " and " Solaris ,the official operation system name in both cases is.IR SunOS )..brDo not change this macro...TPOARCHthis macro contains the object architecture that is usedfor architecture dependent sub directories.It is set to:.IR "$(PARCH)\-$(O_ARCH)\-$(C_ARCH)" ..brDo not change this macro...TPOARCHDIRthis macro contains the concatenation of .I OBJ/and .IR "$(OARCH)" ..brDo not change this macro...TPOFILESthis macro contains the list of objects that are thethe dependency list for the target.It is constructed from the list ofassembler source files,c source files,lex source files andyacc source files..brDo not change this macro...TPOINCSDIRthis macro contains the concatenation of .I $(SRCROOT)/incs/and .IR "$(OARCH)" .It is the location where include files that are made within a make runand subject to global use will be placed..brDo not change this macro..TPOLIBSDIRthis macro contains the concatenation of .I $(SRCROOT)/libs/and .IR "$(OARCH)" .It is the location where libraries that are made within a make runwill be placed..brDo not change this macro...TPOSDEFSthis macro contains operating system specific c-preprocessordefinitions..brDo not change this macro...TPOSNAMEthe unmodified name of the operating system converted to lower case.See.IR O_ARCH ..brDo not change this macro...TPOSRELthe release of the operating system..brDo not change this macro...TPP_ARCHthis macro contains the processor architecture for thetarget machine (e.g..IR "mc68020 mc88200 sparc pentium" ).It is set to the output of.I "uname \-pconverted to lower case.On systems, where .I P_ARCHis not available, it is set to the content of .IR K_ARCH ..brDo not change this macro...TPPARCHthis macro contains the processor architecture for thetarget machine (e.g..IR "mc68020 mc88200 sparc pentium" ).It is set to the output of.I "uname \-pconverted to lower case.On systems, where .I P_ARCHis not available, it is set to the content of .IR K_ARCH ..brDo not change this macro unless you want to do a cross compilation...TPRULESDIRthe value of this macro must be set beforethe rules file.I "$(SRCROOT)/$(RULESDIR/rules.topis included.If you want to test the behavior of a modified versionof the.I makefilesin .IR RULESDIR ,put a copy into an alternate directory, modify one or morefiles in it and then use make with a different value of.IR RULESDIR ,that points to the alternate directory...TPRUNPATHis evaluated on systems, where .I LD_RUN_PATHis supported.It contains the default library search path for dynamic linked targetson runtime. This search path will be stored inside the target.This is usually set in the file.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaultsor .IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .Note that older systems will use .I LD_LIBRARY_PATHfor this purpose too...TPSCRFILEthis macro must be set in a leaf makefile for shell scripts to definethe source for that script file...TPSRCFILEthis macro must be set in a leaf makefile for localized files to definethe source for that file...TPSRCROOTthis macro contains the relative position to the project'ssource root directory.The value of this macro must be set beforethe rules file.I "$(SRCROOT)/$(RULESDIR/rules.topis included..I SRCROOTshould be set to.I ../..if the appropriate leaf makefile is located two directorylevels below the source route...TPSUBARCHDIRmay be set to put the object files and the target intoa different directory than usual..I SUBARCHDIRwill modify the value of .IR ARCHDIR .If you want to make a target that is compiled for .I dbxyou may use:.IR "make COPTX=\-g SUBARCHDIR=\-dbx" ...TPTARGETall makefiles, that are not referring to library targets orsub makes / sub dir makes,must define.I TARGETto be the output file name of the final link operation...TPTARGETLIBall makefiles that are used to make librariesmust define.I TARGETLIBto be the central part of the target library.If you want to make e.g..I libfoodefine.IR "TARGETLIB= foo" .This is needed to allow operating systems to have different naming conventions for libraries.If you are making a non shared library, the example abovewould result in a filename:.I libfoo.afor the real target...TPTARGETMANthis macro must be set in a leaf makefile for manual pages to definethe base name for that manual page (not including the suffix)...TPXMK_FILEmakefiles that want to install manual pages should set .I XMK_FILEto .B Makefile.manto avoid having to install a diversion make file. The make file found in.I XMK_FILEwill be processed only if .I makeis called with the target .IR install ..SH "GETTING STARTED.PPTo set up a new project, first copy the .IR RULES " and " TEMPLATESdirectories and all its content into the project's root directory..PPThen copy a top level makefile, a .I Defaultsfile and a .I Targetdirs.archnamefile into the project's root directory..PPThen create the following directories:.IR cmd ", " lib ", " include ..PPNow start creating target directories e.g below.IR cmd " and " lib .Don't forget to create a makefile and an appropriate.I Targetdirs.archname file on each node directory.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -