1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/cygwin/GNUmakefile.in

36 lines
1,005 B
Text
Raw Normal View History

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
rbconfig.rb: $(DLL)
$(DLL): $(OBJS) dmyext.@OBJEXT@ $(RUBYDEF)
$(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) \
--dllname=$(DLLNAME) --add-stdcall-alias --def=$(RUBYDEF) \
$(RUBYEXP) $(OBJS) dmyext.@OBJEXT@ $(LIBS)
$(RUBYDEF): $(OBJS) dmyext.@OBJEXT@
echo EXPORTS > $(RUBYDEF)
@NM@ --extern-only --defined-only $(OBJS) dmyext.@OBJEXT@ | \
@MINIRUBY@ -ne 'puts $$1 if / [CDT] _(.*)$$/' >> $(RUBYDEF)