Sha256: 7da38a14c56a55aa29b0632bbf939a17d041fd4adbad07c96dcb91b36afc81ae

Contents?: true

Size: 1.71 KB

Versions: 22

Compression:

Stored size: 1.71 KB

Contents

require 'fileutils'

USE_STLPORT = true

puts "Digest extension !"

namespace "build" do

  task :config do

    $targetdir = ENV['TARGET_TEMP_DIR']
    raise "TARGET_TEMP_DIR is not set" if $targetdir.nil?

    $tempdir = ENV['TEMP_FILES_DIR']
    raise "TEMP_FILES_DIR is not set" if $tempdir.nil?

    $rootdir = ENV['RHO_ROOT']
    raise "RHO_ROOT is not set" if $rootdir.nil?

    $xcodebuild = ENV['XCODEBUILD']	
    raise "XCODEBUILD is not set" if $xcodebuild.nil?
 
    $configuration = ENV['CONFIGURATION']	
    raise "CONFIGURATION is not set" if $configuration.nil?

    $sdk = ENV['SDK_NAME']	
    raise "SDK_NAME is not set" if $sdk.nil?

    $bindir = ENV['PLATFORM_DEVELOPER_BIN_DIR']
    raise "PLATFORM_DEVELOPER_BIN_DIR is not set" if $bindir.nil?
    
    $sdkroot = ENV['SDKROOT']
    raise "SDKROOT is not set" if $sdkroot.nil?

    $arch = ENV['ARCHS']
    raise "ARCHS is not set" if $arch.nil?
    
    $gccbin = $bindir + '/gcc-4.2'
    $arbin = $bindir + '/ar'

  end

  task :all => :config do

    iphone_path = '.'

    simulator = $sdk =~ /iphonesimulator/

    if $configuration == 'Distribution'
       $configuration = 'Release'
    end

    result_lib = iphone_path + '/build/' + $configuration + '-' + ( simulator ? "iphonesimulator" : "iphoneos") + '/libDigest.a'
    target_lib = $targetdir + '/libdigest.a'

    rm_rf 'build'
    rm_rf target_lib

    args = ['build', '-target', 'Digest', '-configuration', $configuration, '-sdk', $sdk]

    if simulator
        args << '-arch'
        args << 'i386'
    end

    require   $rootdir + '/lib/build/jake.rb'

    puts Jake.run($xcodebuild,args)
    ret = $?

    # copy result to $targetdir
    cp result_lib,target_lib

  end


end

task :default => "build:all"

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rhodes-3.5.1.12 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.5 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.4.2 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.4 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.3 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.3.beta.4 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.3.beta.3 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.3.beta.2 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.3.beta.1 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2.beta.7 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2.beta.6 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2.beta.5 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2.beta.4 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2.beta.3 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2.beta.2 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.2.beta.1 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.1 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.0 lib/extensions/digest/ext/iphone/Rakefile
rhodes-3.3.0.beta.3 lib/extensions/digest/ext/iphone/Rakefile