diff options
Diffstat (limited to 'tools/mirb')
| -rw-r--r-- | tools/mirb/Makefile | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tools/mirb/Makefile b/tools/mirb/Makefile index 8dbbc52b3..c44af4c6b 100644 --- a/tools/mirb/Makefile +++ b/tools/mirb/Makefile @@ -3,9 +3,27 @@ # project-specific macros # extension of the executable-file is modifiable(.exe .out ...) +MRUBY_ROOT := ../.. BASEDIR = ../../src TARGET := ../../bin/mirb LIBR := ../../lib/libmruby.a + +ifeq ($(strip $(ENABLE_GEMS)),) + # by default GEMs are deactivated + ENABLE_GEMS = false +endif + +ifeq ($(ENABLE_GEMS),false) + GEM_ARCHIVE_FILES = +else + MAKEFILE_GEM_LIST := $(MRUBY_ROOT)/mrbgems/g/MakefileGemList + ifeq ($(wildcard $(MAKEFILE_GEM_LIST)),) + GEM_ARCHIVE_FILES = + else + include $(MAKEFILE_GEM_LIST) + endif +endif + ifeq ($(OS),Windows_NT) EXE := $(TARGET).exe else @@ -49,7 +67,7 @@ all : $(LIBR) $(EXE) # executable constructed using linker from object files $(EXE) : $(LIBR) $(OBJS) $(EXTS) - $(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(EXTS) $(LIBS) + $(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(GEM_ARCHIVE_FILES) $(EXTS) $(LIBS) -include $(OBJS:.o=.d) |
