diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-12-07 01:04:32 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-12-07 01:04:32 -0800 |
| commit | f521738953b9297a4d26e68ec42b7e9a22e5b442 (patch) | |
| tree | c54451f210ebea9233229cc29ad82311e554ff63 /Makefile | |
| parent | bd3b95cae66bf68a757a0dcdf05bcb05eb177391 (diff) | |
| parent | bef73cc54f044e16caf6bc1ba16ed0bf779c5ade (diff) | |
| download | mruby-f521738953b9297a4d26e68ec42b7e9a22e5b442.tar.gz mruby-f521738953b9297a4d26e68ec42b7e9a22e5b442.zip | |
Merge pull request #479 from bovi/mrbgems
mrbgems
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -7,6 +7,18 @@ export LL = gcc export AR = ar export YACC = bison +MRUBY_ROOT := $(realpath .) + +ifeq ($(strip $(ENABLE_GEMS)),) + # by default GEMs are deactivated + ENABLE_GEMS = false +endif + +ifeq ($(strip $(ACTIVE_GEMS)),) + # the default file which contains the active GEMs + ACTIVE_GEMS = GEMS.active +endif + ifeq ($(strip $(COMPILE_MODE)),) # default compile option COMPILE_MODE = debug @@ -22,9 +34,9 @@ endif ALL_CFLAGS = -Wall -Werror-implicit-function-declaration $(CFLAGS) ifeq ($(OS),Windows_NT) - MAKE_FLAGS = --no-print-directory CC=$(CC) LL=$(LL) ALL_CFLAGS='$(ALL_CFLAGS)' + MAKE_FLAGS = --no-print-directory CC=$(CC) LL=$(LL) ALL_CFLAGS='$(ALL_CFLAGS)' ENABLE_GEMS='$(ENABLE_GEMS)' ACTIVE_GEMS='$(ACTIVE_GEMS)' MRUBY_ROOT='$(MRUBY_ROOT)' else - MAKE_FLAGS = --no-print-directory CC='$(CC)' LL='$(LL)' ALL_CFLAGS='$(ALL_CFLAGS)' + MAKE_FLAGS = --no-print-directory CC='$(CC)' LL='$(LL)' ALL_CFLAGS='$(ALL_CFLAGS)' ENABLE_GEMS='$(ENABLE_GEMS)' ACTIVE_GEMS='$(ACTIVE_GEMS)' MRUBY_ROOT='$(MRUBY_ROOT)' endif ############################## @@ -44,7 +56,11 @@ export CAT := cat all : @$(MAKE) -C src $(MAKE_FLAGS) @$(MAKE) -C mrblib $(MAKE_FLAGS) - @$(MAKE) -C tools/mruby $(MAKE_FLAGS) +ifeq ($(ENABLE_GEMS),true) + @echo "-- MAKE mrbgems --" + @$(MAKE) -C mrbgems $(MAKE_FLAGS) +endif + $(MAKE) -C tools/mruby $(MAKE_FLAGS) @$(MAKE) -C tools/mirb $(MAKE_FLAGS) # mruby test @@ -56,6 +72,10 @@ test : all .PHONY : clean clean : @$(MAKE) clean -C src $(MAKE_FLAGS) +ifeq ($(ENABLE_GEMS),true) + @echo "-- CLEAN mrbgems --" + @$(MAKE) clean -C mrbgems $(MAKE_FLAGS) +endif @$(MAKE) clean -C tools/mruby $(MAKE_FLAGS) @$(MAKE) clean -C tools/mirb $(MAKE_FLAGS) @$(MAKE) clean -C test $(MAKE_FLAGS) |
