daovm = DaoMake::FindPackage( "Dao", $REQUIRED ) if( daovm == none ) return project = DaoMake::Project( "DaoClinker" ) project.UseImportLibrary( daovm ) ffi = DaoMake::FindPackage( "FFI2", $OPTIONAL ) if( ffi ){ project.UseImportLibrary( ffi, "FFI" ) }else{ project.AddDirectory( "libffi", "libffi" ) ffi = DaoMake::FindPackage( "FFI", $REQUIRED ) project.UseStaticLibrary( ffi, "ffi" ) } project.AddIncludePath( "." ) project.AddIncludePath( "../../kernel" ) clinker_objs = project.AddObjects( { "dao_clinker.c" } ) clinker_dll = project.AddSharedLibrary( "dao_clinker", clinker_objs ) clinker_dll.SetTargetPath( "../../lib/dao/modules" ) sample_objs = project.AddObjects( { "sample.c" } ) sample_dll = project.AddSharedLibrary( "sample", sample_objs ) #sample_dll.SetTargetPath( "../../lib/dao/modules/clinker" ) project.GenerateFinder( $TRUE ); project.Install( DaoMake::Variables[ "INSTALL_MOD" ], clinker_dll ); daovm_doc_path = DaoMake::Variables[ "INSTALL_DOC" ]; demos = { "sample.dao", "sample.c" } project.Install( DaoMake::MakePath( daovm_doc_path, "./demo/modules/clinker" ), demos ) project.Install( DaoMake::MakePath( daovm_doc_path, "./demo/modules/clinker" ), sample_dll )