-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
38 lines (34 loc) · 1.07 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# frozen_string_literal: true
namespace :compat do
namespace :darwin do
desc 'Builds the Compatability Layer for Arm Darwin'
task :arm do
Dir.chdir('./mruby/') do
sh 'clang -target arm64-darwin -c mruby_compat.c -Ivendor '
sh 'llvm-ar rc vendor/darwin/arm/libmruby_compat.a mruby_compat.o'
FileUtils.rm('mruby_compat.o')
end
end
desc 'Builds the Compatability Layer for Intel Darwin'
task :amd do
Dir.chdir('./mruby/') do
sh 'clang -target x86_64-darwin -c mruby_compat.c -Ivendor'
sh 'llvm-ar rc vendor/darwin/amd/libmruby_compat.a mruby_compat.o'
FileUtils.rm('mruby_compat.o')
end
end
end
desc 'Builds the Compatability Layer for Windows'
task :windows do
Dir.chdir('./mruby/') do
sh 'cl /nologo /c /EHsc .\mruby_compat.c /IVendor'
sh 'lib /nologo mruby_compat.obj'
FileUtils.rm('mruby_compat.obj')
FileUtils.mv('mruby_compat.lib', './vendor/windows')
end
end
end
desc 'Builds the EXE'
task :build do
sh 'odin build . -min-link-libs -debug'
end