summaryrefslogtreecommitdiff
path: root/cygwin
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-05 14:12:27 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-05 14:12:27 +0000
commita26972d26f38e6c023a955a1073c2801cbf6357b (patch)
treeec2281cba2b787bb3c94d4e4892736216edca78c /cygwin
parent70fa7705dc9ec7ca7807971a4312923555deccb0 (diff)
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cygwin')
-rw-r--r--cygwin/GNUmakefile.in27
1 files changed, 18 insertions, 9 deletions
diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index 7994e22..e1b1f7c 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -5,22 +5,31 @@ ENABLE_SHARED=@ENABLE_SHARED@
ifneq (,$(findstring no, $(ENABLE_SHARED)))
DLL = dummy.exe
- DLLNAME = ruby.exe
- RUBYEXP = --output-exp=ruby.exp
- MAINOBJ := ruby.exp $(MAINOBJ)
+ 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 = rubymg.dll
- DLLNAME = rubymg.dll
+ DLL = $(RUBY_INSTALL_NAME)mg.dll
+ DLLNAME = $(RUBY_INSTALL_NAME)mg.dll
else
- DLL = rubycw.dll
- DLLNAME = rubycw.dll
+ 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
- $(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) --dllname=$(DLLNAME) --add-stdcall-alias $(RUBYEXP) $(OBJS) dmyext.o $(LIBS)
+$(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)