From 27949708691691a0eefd6f6ab04b0df5dd67a0ae Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 19 Jan 2004 04:10:53 +0000 Subject: * ext/extmk.rb, win32/Makefile.sub, win32/configure.bat, win32/setup.mak: --with-static-linked-ext support on mswin32. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/extmk.rb | 6 ++++-- win32/Makefile.sub | 20 +++++++++++++------- win32/configure.bat | 15 +++++++++++---- win32/setup.mak | 1 + 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60c8115cb..33e51a3bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 19 13:09:21 2004 NAKAMURA Usaku + + * ext/extmk.rb, win32/Makefile.sub, win32/configure.bat, + win32/setup.mak: --with-static-linked-ext support on mswin32. + Mon Jan 19 06:49:07 2004 Tadayoshi Funaba * lib/date.rb: zone was wrong when it was behind UTC. diff --git a/ext/extmk.rb b/ext/extmk.rb index 04d559a54..dd9fec456 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -107,8 +107,10 @@ def extmake(target) $extflags ||= "" $extlibs ||= [] $extpath ||= [] - $extflags += " " + $DLDFLAGS unless $DLDFLAGS.empty? - $extflags += " " + $LDFLAGS unless $LDFLAGS.empty? + unless $mswin + $extflags += " " + $DLDFLAGS unless $DLDFLAGS.empty? + $extflags += " " + $LDFLAGS unless $LDFLAGS.empty? + end $extlibs = merge_libs($extlibs, $libs.split, $LOCAL_LIBS.split) $extpath |= $LIBPATH end diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 4c12dadb8..2719cb0b3 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -134,7 +134,13 @@ LIBRUBY_SO = $(RUBY_SO_NAME).dll LIBRUBY = $(RUBY_SO_NAME).lib LIBRUBYARG = $(LIBRUBY) +!if !defined(EXTSTATIC) +EXTSTATIC = +!endif + EXTOBJS = +DLDOBJS = +DMYEXT = dmyext.obj MAINOBJ = main.obj WINMAINOBJ = winmain.obj @@ -397,9 +403,9 @@ s,@srcdir@,$(srcdir),;t t s,@top_srcdir@,$(srcdir),;t t <> ~tmp~.mak "%1" \ @@ -35,14 +36,20 @@ goto :loop shift shift goto :loop +:extstatic + echo>> ~tmp~.mak "EXTSTATIC=static" \ + shift +goto :loop :help echo Configuration: - echo --help display this help - echo --srcdir=DIR find the sources in DIR [configure dir or `..'] + echo --help display this help + echo --srcdir=DIR find the sources in DIR [configure dir or `..'] echo Installation directories: - echo --prefix=PREFIX install files in PREFIX [/usr] + echo --prefix=PREFIX install files in PREFIX [/usr] echo System types: - echo --target=TARGET configure for TARGET [i386-mswin32] + echo --target=TARGET configure for TARGET [i386-mswin32] + echo Optional Package: + echo --with-static-linked-ext link external modules statically del ~tmp~.mak goto :exit :end diff --git a/win32/setup.mak b/win32/setup.mak index 188b418b3..25155a0b9 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -36,6 +36,7 @@ alpha-$(OS): -prologue- -alpha- -epilogue- ### Makefile for ruby $(OS) ### srcdir = $(srcdir:\=/) prefix = $(prefix:\=/) +EXTSTATIC = $(EXTSTATIC) << @cl -nologo -EP -I$(srcdir) <<"Creating $(MAKEFILE)" >> $(MAKEFILE) #include "version.h" -- cgit