代码拉取完成,页面将自动刷新
# Building system for single executable deployment:
#
# Given example.dao, the following will compile it into bytecodes,
# and bundle the bytecodes with Dao runtime and loaded modules
# into a single executable:
#
# make -f Makefile.daomake macosx OPTIONS="--option-BUNDLE-SCRIPT example"
daovm_bundle = DaoMake::Option( "BUNDLE", "" )
if( daovm_bundle == "" ) return;
bundler = DaoMake::Project( "DaoBundler" )
bundle_main = bundler.AddObjects( { "kernel/daoMain.c" } )
bundle_script = bundler.AddObjects( { std.path( $working ) / (daovm_bundle + ".dar.c") } )
bundle_main.AddDefinition( "DAO_WITH_STATIC_MODULES" )
bundle_script.AddIncludePath( "kernel" )
bundle = bundler.AddExecutable( daovm_bundle, bundle_main, bundle_script )
finders = DaoMake::ReadFile( daovm_bundle + ".dar.finders" )
bundle_finders = finders.split( "\n" )
# The path variable $(CMD_DIR) in the ".finders" file refers to the building directory,
# which is the working directory for Dao to compile the program. And this script
# should also be executed in the same directory.
cmd_dir = std.path( $working )
dao_dir = DaoMake::GetEnv( "DAO_DIR" )
home_dir = DaoMake::GetEnv( "HOME" )
for( finder in bundle_finders ){
finder = finder.replace( "$(CMD_DIR)/", cmd_dir )
finder = finder.replace( "$(DAO_DIR)/", dao_dir )
finder = finder.replace( "$(HOME)/", home_dir )
fields = finder.split( "\t" )
if( fields.size() < 3 ) skip;
if( DaoMake::IsFile( fields[1] ) ) std.load( fields[1] )
pro = DaoMake::FindPackage( fields[0] )
io.writeln( ">>>>> bundle:", pro, fields )
if( pro != none ) bundle.UseStaticLibrary( pro )
}
# Linking to static library needs to be placed after the objects/libraries
# with unresolved symbols in Linux:
std.load( "FindDao.dao" )
daovm = DaoMake::FindPackage( "Dao" )
if( daovm != none ){
bundle.UseStaticLibrary( daovm, "dao" )
bundle.UseStaticLibrary( daovm, "dao_aux" )
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。