summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorYuichiro MASUI <[email protected]>2012-12-22 01:38:06 +0900
committerYuichiro MASUI <[email protected]>2012-12-22 01:38:06 +0900
commitdee0b2283c180c4e2584ff27dcb241a80fb7cfc2 (patch)
tree9e1a6e1f1c3cf399aa51ce88d328a24fe62bb227 /Rakefile
parent429359819a9a3155984c134f62976a42d314244c (diff)
downloadmruby-dee0b2283c180c4e2584ff27dcb241a80fb7cfc2.tar.gz
mruby-dee0b2283c180c4e2584ff27dcb241a80fb7cfc2.zip
Add MRUBY_CFLAGS / MRUBY_LDFLAGS to mrbgems
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Rakefile b/Rakefile
index aec259e06..61bf248b1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -36,8 +36,13 @@ end
LDFLAGS = [ENV['LDFLAGS']]
LIBS = [ENV['LIBS'] || '-lm']
+if ENABLE_GEMS
+ require './mrbgems/build_tasks'
+ Rake::Task[:load_mrbgems_flags].invoke
+else
+ CFLAGS << "-DDISABLE_GEMS"
+end
-CFLAGS << "-DDISABLE_GEMS" unless ENABLE_GEMS
CFLAGS << "-Wall" << "-Werror-implicit-function-declaration" << "-I#{MRUBY_ROOT}/include"
if ENV['OS'] == 'Windows_NT'
@@ -58,10 +63,6 @@ CAT = ENV['CAT'] ||= 'cat'
##############################
# generic build targets, rules
-if ENABLE_GEMS
- require './mrbgems/build_tasks'
-end
-
task :default => :all
desc "build all targets, install (locally) in-repo"