-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_config.rb
95 lines (81 loc) · 2.26 KB
/
build_config.rb
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
def gem_config(conf)
#conf.gembox 'default'
# be sure to include this gem (the cli app)
conf.gem File.expand_path(File.dirname(__FILE__))
end
MRuby::Build.new do |conf|
toolchain :clang
conf.enable_bintest
conf.enable_debug
conf.enable_test
gem_config(conf)
end
MRuby::CrossBuild.new('x86_64-pc-linux-gnu') do |conf|
toolchain :gcc
conf.host_target = 'x86_64-pc-linux-gnu'
gem_config(conf)
end
# MRuby::CrossBuild.new('i686-pc-linux-gnu') do |conf|
# toolchain :gcc
#
# [conf.cc, conf.cxx, conf.linker].each do |cc|
# cc.flags << "-m32"
# end
#
# gem_config(conf)
# end
MRuby::CrossBuild.new('x86_64-apple-darwin14') do |conf|
toolchain :clang
[conf.cc, conf.linker].each do |cc|
cc.command = 'x86_64-apple-darwin14-clang'
end
conf.cxx.command = 'x86_64-apple-darwin14-clang++'
conf.archiver.command = 'x86_64-apple-darwin14-ar'
conf.build_target = 'x86_64-pc-linux-gnu'
conf.host_target = 'x86_64-apple-darwin14'
gem_config(conf)
end
# MRuby::CrossBuild.new('i386-apple-darwin14') do |conf|
# toolchain :clang
#
# [conf.cc, conf.linker].each do |cc|
# cc.command = 'i386-apple-darwin14-clang'
# end
# conf.cxx.command = 'i386-apple-darwin14-clang++'
# conf.archiver.command = 'i386-apple-darwin14-ar'
#
# conf.build_target = 'i386-pc-linux-gnu'
# conf.host_target = 'i386-apple-darwin14'
#
# gem_config(conf)
# end
# MRuby::CrossBuild.new('x86_64-w64-mingw32') do |conf|
# toolchain :gcc
#
# [conf.cc, conf.linker].each do |cc|
# cc.command = 'x86_64-w64-mingw32-gcc'
# end
# conf.cxx.command = 'x86_64-w64-mingw32-cpp'
# conf.archiver.command = 'x86_64-w64-mingw32-gcc-ar'
# conf.exts.executable = ".exe"
#
# conf.build_target = 'x86_64-pc-linux-gnu'
# conf.host_target = 'x86_64-w64-mingw32'
#
# gem_config(conf)
# end
# MRuby::CrossBuild.new('i686-w64-mingw32') do |conf|
# toolchain :gcc
#
# [conf.cc, conf.linker].each do |cc|
# cc.command = 'i686-w64-mingw32-gcc'
# end
# conf.cxx.command = 'i686-w64-mingw32-cpp'
# conf.archiver.command = 'i686-w64-mingw32-gcc-ar'
# conf.exts.executable = ".exe"
#
# conf.build_target = 'i686-pc-linux-gnu'
# conf.host_target = 'i686-w64-mingw32'
#
# gem_config(conf)
# end