Skip to content

Instantly share code, notes, and snippets.

@carsonmcdonald
Created January 15, 2013 20:41
Show Gist options
  • Save carsonmcdonald/4541836 to your computer and use it in GitHub Desktop.
Save carsonmcdonald/4541836 to your computer and use it in GitHub Desktop.
MRuby::Build.new do |conf|
conf.cc = ENV['CC'] || 'gcc'
conf.ld = ENV['LD'] || 'gcc'
conf.ar = ENV['AR'] || 'ar'
conf.cflags << (ENV['CFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration))
conf.ldflags << (ENV['LDFLAGS'] || %w(-lm))
end
SIM_SYSROOT="#{SIMSDKPATH}"
DEVICE_SYSROOT="#{IOSSDKPATH}"
MRuby::CrossBuild.new('ios-simulator') do |conf|
conf.cc = 'xcrun'
conf.ld = 'xcrun'
conf.ar = 'ar'
conf.bins = []
conf.cflags = %W(-sdk iphoneos llvm-gcc-4.2 -arch i386 -isysroot #{SIM_SYSROOT} -g -O3 -Wall -Werror-implicit-function-declaration -DDISABLE_GEMS)
conf.ldflags = %W(-sdk iphoneos llvm-gcc-4.2 -arch i386 -isysroot #{SIM_SYSROOT})
end
MRuby::CrossBuild.new('ios-armv7') do |conf|
conf.cc = 'xcrun'
conf.ld = 'xcrun'
conf.ar = 'ar'
conf.bins = []
conf.cflags = %W(-sdk iphoneos llvm-gcc-4.2 -arch armv7 -isysroot #{DEVICE_SYSROOT} -g -O3 -Wall -Werror-implicit-function-declaration -DDISABLE_GEMS)
conf.ldflags = %W(-sdk iphoneos llvm-gcc-4.2 -arch armv7 -isysroot #{DEVICE_SYSROOT})
end
MRuby::CrossBuild.new('ios-armv7s') do |conf|
conf.cc = 'xcrun'
conf.ld = 'xcrun'
conf.ar = 'ar'
conf.bins = []
conf.cflags = %W(-sdk iphoneos llvm-gcc-4.2 -arch armv7s -isysroot #{DEVICE_SYSROOT} -g -O3 -Wall -Werror-implicit-function-declaration -DDISABLE_GEMS)
conf.ldflags = %W(-sdk iphoneos llvm-gcc-4.2 -arch armv7s -isysroot #{DEVICE_SYSROOT})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment