mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Include dynamically GEMs into mruby
This commit is contained in:
+13
-4
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user