mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
a26972d26f
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
35 lines
981 B
Text
35 lines
981 B
Text
include Makefile
|
|
|
|
ARCH=@arch@
|
|
ENABLE_SHARED=@ENABLE_SHARED@
|
|
|
|
ifneq (,$(findstring no, $(ENABLE_SHARED)))
|
|
DLL = dummy.exe
|
|
DLLNAME = $(RUBY_INSTALL_NAME)$(EXEEXT)
|
|
RUBYEXP = --output-exp=$(RUBY_INSTALL_NAME).exp
|
|
MAINOBJ := $(RUBY_INSTALL_NAME).exp $(MAINOBJ)
|
|
LIBRUBYARG := lib$(RUBY_INSTALL_NAME)s.a
|
|
else
|
|
ifneq (,$(findstring mingw, $(ARCH)))
|
|
DLL = $(RUBY_INSTALL_NAME)mg.dll
|
|
DLLNAME = $(RUBY_INSTALL_NAME)mg.dll
|
|
else
|
|
DLL = $(RUBY_INSTALL_NAME)cw.dll
|
|
DLLNAME = $(RUBY_INSTALL_NAME)cw.dll
|
|
endif
|
|
RUBYEXP =
|
|
endif
|
|
|
|
RUBYDEF = $(RUBY_INSTALL_NAME).def
|
|
|
|
miniruby$(EXEEXT): $(DLL)
|
|
|
|
$(DLL): $(OBJS) dmyext.o $(RUBYDEF)
|
|
$(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) \
|
|
--dllname=$(DLLNAME) --add-stdcall-alias --def=$(RUBYDEF) \
|
|
$(RUBYEXP) $(OBJS) dmyext.o $(LIBS)
|
|
|
|
$(RUBYDEF): $(OBJS) dmyext.o
|
|
echo EXPORTS > $(RUBYDEF)
|
|
@NM@ --extern-only --defined-only $(OBJS) dmyext.o | \
|
|
sed -n '/^........ [CDT] _\(.*\)$$/s//\1/p' >> $(RUBYDEF)
|