Files
RubyMotion/bin/Rakefile
2012-02-18 18:20:50 +01:00

28 lines
1.2 KiB
Ruby

verbose(true)
task :default => :all
task :all => [:files, :deploy, :sim]
task :files do
install '../vm/miniruby', 'ruby'
install '/usr/local/bin/llc', 'llc'
end
task :deploy do
if !File.exist?('deploy') or File.mtime('deploy.m') > File.mtime('deploy')
sh "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -I./src -std=c99 -Wall -O3 deploy.m -o deploy -framework Foundation"
sh "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -x deploy"
end
end
task :sim do
if !File.exist?('sim') or File.mtime('sim.m') > File.mtime('sim')
sh "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -I./src -std=c99 -Wall -O3 sim.m -o sim -framework Foundation"
sh "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -x sim"
end
end
task :clean do
%w{ruby llc deploy sim}.each { |path| rm_rf(path) }
end