[NAME] ALL.tool.standard.daomake.project [TITLE] Project File [DESCRIPTION] A DaoMake project file is a regular Dao script file that configure the project using som e dedicated types and methods. The following is simple DaoMake project file (say myprojec t.dao), 1 project = DaoMake::Project( "MyProject" ) 2 3 project_objs = project.AddObjects( { "myfile1.c", "myfile2.c" } ) 4 project_exe = project.AddExecutable( "myexe", project_objs ) To generate Makefile for this project, simply run the following in the same directory as the project file, 1 $$ daomake --platform PLATFORM myproject.dao where PLATFORM can be one of the followings: * linux * macosx * freebsd * openbsd * mingw * minix * haiku If the project file is not passed as a command line argument to DaoMake, it will assume i t is a file named makefile.dao. DaoMake provides a number of types, methods and global variables for configuring projects . The most important ones are: Project, Target and Objects, which are all subtypes of the compiling unit type Unit. 0.1 DaoMake::Project * Project(name:string)=>Project * AddObjects(self:Project,sources:list<string>,headers:list<string>={})=>Objects * AddExecutable(self:Project,name:string,objs:Objects,...:Objects)=>Target * AddSharedLibrary(self:Project,name:string,objs:Objects,...:Objects)=>Target * AddStaticLibrary(self:Project,name:string,objs:Objects,...:Objects)=>Target * AddCommand(self:Project,name:string,command:string,...:string)=>Target * AddDirectory(self:Project,name:string,path:string,...:string)=>Target * Install(self:Project,dest:string,target:Target,...:Target) * Install(self:Project,dest:string,file:string,...:string) * Install(self:Project,dest:string,headers:list<string>) * SourcePath(self:Project)=>string * BinaryPath(self:Project)=>string * AddVariable(self:Project,name:string,value:string) * ExportLibrary(self:Project,name:string,cflag:string,lflag:string,shlib='',stlib='') * ExportPath(self:Project,name:string,path:string) * GetPath(self:Project,name:string)=>string * GenerateFinder(self:Project,bl:enum<FALSE,TRUE>=$TRUE) 0.2 DaoMake::Target * Name(self:Target)=>string * AddObjects(self:Target,objects:Objects,...:Objects) * AddCommand(self:Target,command:string,...:string) * AddTest(self:Target,test:string,...:string) * AddDependency(self:Target,target:Target,...:Target) * EnableDynamicExporting(self:Target,bl:enum<FALSE,TRUE>=$TRUE) * EnableDynamicLinking(self:Target,bl:enum<FALSE,TRUE>=$TRUE) * SetTargetPath(self:Target,path:string) * Install(self:Target,dest:string) 0.3 DaoMake::Objects * AddHeaders(file:string,...:string) * AddSources(file:string,...:string) 0.4 DaoMake::Objects * AddDefinition(self:Unit,name:string,value='') * AddIncludePath(self:Unit,path:string,...:string) * AddLinkingPath(self:Unit,path:string,...:string) * AddCompilingFlag(self:Unit,flag:string,...:string) * AddLinkingFlag(self:Unit,flag:string,...:string) * AddRpath(self:Unit,flag:string,...:string) * UseImportLibrary(self:Unit,pro:Project,...:string) * UseSharedLibrary(self:Unit,pro:Project,...:string) * UseStaticLibrary(self:Unit,pro:Project,...:string) * MakeDefinitions(self:Unit)=>string * MakeIncludePaths(self:Unit)=>string * MakeLinkingPaths(self:Unit)=>string * MakeCompilingFlags(self:Unit)=>string * MakeLinkingFlags(self:Unit)=>string 0.5 DaoMake Methods * FindPackage(name:string,opt:enum<OPTIONAL,REQUIRED>=$OPTIONAL)=>Project * FindFile(file:string,hints:list<string>={})=>string * TestCompile(code:string,lflag='',cflag='',cxx=0)=>int * Option(name:string,value:enum<OFF,ON>)=>enum<OFF,ON> * Option(name:string,value='')=>string * MakefileSuffix()=>string * Shell(command:string)=>string * GetEnv(name:string)=>string * SourcePath()=>string * BinaryPath()=>string * MakeRpath(path:string,...:string)=>string * BuildMode()=>enum<RELEASE,DEBUG,PROFILE> * SetTestTool(test:string,log_option='--log') * IsFile(path:string)=>int * IsDir(path:string)=>int * Platform()=>string * IsPlatform(platform:string)=>int * Is64Bit()=>int 0.6 DaoMake Globals * DaoMake::Settings * DaoMake::Compilers * DaoMake::Linkers * DaoMake::Includes