diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mruby/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/mruby/Makefile b/tools/mruby/Makefile index e94c1b2b4..53383a70b 100644 --- a/tools/mruby/Makefile +++ b/tools/mruby/Makefile @@ -3,9 +3,18 @@ # project-specific macros # extension of the executable-file is modifiable(.exe .out ...) -BASEDIR = ../../src -TARGET := ../../bin/mruby -LIBR := ../../lib/libmruby.a +MRUBY_ROOT := ../.. +BASEDIR = $(MRUBY_ROOT)/src +TARGET := $(MRUBY_ROOT)/bin/mruby +LIBR := $(MRUBY_ROOT)/lib/libmruby.a + +MAKEFILE_GEM_LIST := $(MRUBY_ROOT)/mrbgems/g/MakefileGemList +ifeq ($(wildcard $(MAKEFILE_GEM_LIST)),) + GEM_ARCHIVE_FILES = +else + include $(MAKEFILE_GEM_LIST) +endif + ifeq ($(OS),Windows_NT) EXE := $(TARGET).exe else @@ -54,7 +63,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) |
