summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorYukihiro Matz Matsumoto <[email protected]>2012-12-18 03:14:05 +0900
committerYukihiro Matz Matsumoto <[email protected]>2012-12-18 03:14:05 +0900
commit384633dd5aef0c324a1716aa7496073b4301f41e (patch)
tree8b43a4ee5646974b7c7d17cf20a751a9ef694f65 /Rakefile
parent24feb401c1b7c3bc63c9783bc4d21d3518da4584 (diff)
downloadmruby-384633dd5aef0c324a1716aa7496073b4301f41e.tar.gz
mruby-384633dd5aef0c324a1716aa7496073b4301f41e.zip
Rakefile to honor CFLAGS env by default
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 3 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index 0418be72f..a5172afc5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -25,14 +25,13 @@ COMPILE_MODE = :debug
# compile flags
case COMPILE_MODE.to_s
-when 'debug'
- CFLAGS = ['-g', '-O3', ENV['CFLAGS']]
when 'release'
CFLAGS = ['-O3']
when 'small'
CFLAGS = ['-Os']
-else
- CFLAGS = [ENV['CFLAGS']]
+else # including 'debug'
+ e = ENV['CFLAGS']
+ CFLAGS = if e then [e] else ['-g', '-O3'] end
end
LDFLAGS = [ENV['LDFLAGS']]