diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2012-12-22 00:14:43 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2012-12-22 00:14:43 +0900 |
| commit | 46a3bd76e5baa787933cb61acbb7b5cae851fdcf (patch) | |
| tree | e159b3fb0638d8590068bf7710233aba549f94fb | |
| parent | bfd41bd6bf09becfc035c9b9805b29b9ebbf532c (diff) | |
| parent | 8941859b0ee5d55bcf850a5b17e4fbeac7aaf37a (diff) | |
| download | mruby-46a3bd76e5baa787933cb61acbb7b5cae851fdcf.tar.gz mruby-46a3bd76e5baa787933cb61acbb7b5cae851fdcf.zip | |
Merge branch 'master' of github.com:mruby/mruby
| -rw-r--r-- | Rakefile | 19 | ||||
| -rw-r--r-- | cmake/modules/IntrospectSystem.cmake | 2 |
2 files changed, 11 insertions, 10 deletions
@@ -2,9 +2,9 @@ # basic build file for mruby # compiler, linker (gcc), archiver, parser generator -CC = ENV['CC'] || 'gcc' -LL = ENV['LL'] || 'gcc' -AR = ENV['AR'] || 'ar' +CC = ENV['CC'] || 'gcc' +LL = ENV['LL'] || 'gcc' +AR = ENV['AR'] || 'ar' YACC = ENV['YACC'] || 'bison' MAKE = ENV['MAKE'] || 'make' @@ -15,10 +15,10 @@ MRUBY_ROOT = ENV['MRUBY_ROOT'] || File.expand_path(File.dirname(__FILE__)) ENABLE_GEMS = ENV['ENABLE_GEMS'] == 'true' # the default file which contains the active GEMs -ACTIVE_GEMS = File.join(File.dirname(__FILE__), 'mrbgems', 'GEMS.active') +ACTIVE_GEMS = ENV['ACTIVE_GEMS'] || File.join(MRUBY_ROOT, '/mrbgems/GEMS.active') # default compile option -COMPILE_MODE = :debug +COMPILE_MODE = ENV['COMPILE_MODE'] || :debug ############################## @@ -34,13 +34,12 @@ else # including 'debug' CFLAGS = if e then [e] else ['-g', '-O3'] end end LDFLAGS = [ENV['LDFLAGS']] -LIBS = [ENV['LIBS'] || '-lm'] +LIBS = [ENV['LIBS'] || '-lm'] -if !ENABLE_GEMS - 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' MAKE_FLAGS = "--no-print-directory CC=#{CC} LL=#{LL} AR=#{AR} YACC=#{YACC} CFLAGS=\"#{CFLAGS.join(' ')}\" LDFLAGS=\"#{LDFLAGS.join(' ')}\" LIBS=\"#{LIBS.join(' ')}\" ENABLE_GEMS=\"#{ENABLE_GEMS}\" MRUBY_ROOT=\"#{MRUBY_ROOT}\"" else @@ -48,7 +47,6 @@ else end - ############################## # internal variables @@ -59,6 +57,7 @@ CAT = ENV['CAT'] ||= 'cat' ############################## # generic build targets, rules + if ENABLE_GEMS require './mrbgems/build_tasks' end diff --git a/cmake/modules/IntrospectSystem.cmake b/cmake/modules/IntrospectSystem.cmake index 722f4c3d7..559b884b8 100644 --- a/cmake/modules/IntrospectSystem.cmake +++ b/cmake/modules/IntrospectSystem.cmake @@ -20,6 +20,8 @@ else() endif() endif() +add_definitions(-DDISABLE_GEMS) + if(MSVC) add_definitions( -DRUBY_EXPORT # required by oniguruma.h |
