Rakefile to honor CFLAGS env by default

This commit is contained in:
Yukihiro Matz Matsumoto
2012-12-18 03:14:05 +09:00
parent 24feb401c1
commit 384633dd5a
+3 -4
View File
@@ -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']]