forked from enriquez/ECPhoneNumberFormatter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
23 lines (19 loc) · 663 Bytes
/
Rakefile
File metadata and controls
23 lines (19 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
desc "Build bundles"
task :build => :clean do
gcc = RbConfig::CONFIG['CC']
cflags = RbConfig::CONFIG['CFLAGS'] + ' ' + RbConfig::CONFIG['ARCH_FLAG']
cflags.sub!(/-O./, '-O3')
cflags << " -Wall"
Dir.chdir('ext/PhoneNumberFormatter') do
sh "#{gcc} #{cflags} -fobjc-gc PhoneNumberFormatter.m -c -o PhoneNumberFormatter.o"
sh "#{RbConfig::CONFIG['LDSHARED']} -lcrypto PhoneNumberFormatter.o -o PhoneNumberFormatter.bundle"
end
end
desc "Clean packages and extensions"
task :clean do
sh "rm -rf ext/PhoneNumberFormatter/*.o ext/PhoneNumberFormatter/*.bundle"
end
desc "Run specs"
task :default => :build do
sh "macbacon spec/*_spec.rb"
end