summaryrefslogtreecommitdiff
path: root/win32/Makefile.sub
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-10 08:24:11 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-10 08:24:11 +0000
commita3faa7e2e27c74b8f412de3f4b7d7e7e2c4881b8 (patch)
tree8cf237e2af220fcea8f6992a4880e9010e0620d1 /win32/Makefile.sub
parentb3a426e70a662184f587396e8fe2cd2544b24242 (diff)
* win32/Makefile.sub (miniruby): shouldn't link $(EXTOBJS).
* win32/Makefile.sub ($(LIBRUBY_A), $(LIBRUBY)): avoid lib.exe's warning. * win32/Makefile.sub: remove unnecessary rules. * win32/configure.bat, win32/setup.mak, win32/README.win32: enable to pass some arguments to configure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile.sub')
-rw-r--r--win32/Makefile.sub43
1 files changed, 16 insertions, 27 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index d48d4bd..5a89f8f 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -15,9 +15,6 @@ RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
!if "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w
!endif
-!ifndef RUBY_SO_NAME
-RUBY_SO_NAME = rubymw
-!endif
!if !defined(icondirs) && defined(ICONDIRS)
icondirs=$(ICONDIRS)
!endif
@@ -36,10 +33,15 @@ CC = cl
!if !defined(YACC)
YACC = byacc
!endif
+AR = lib -nologo
PURIFY =
AUTOCONF = autoconf
-!if !defined(PROCESSOR_ARCHITECTURE) || "$(PROCESSOR_ARCHITECTURE)" == "x86"
+!if !defined(PROCESSOR_ARCHITECTURE)
+PROCESSOR_ARCHITECTURE = x86
+!endif
+MACHINE = $(PROCESSOR_ARCHITECTURE)
+!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
!if !defined(PROCESSOR_LEVEL)
PROCESSOR_LEVEL = 5
!endif
@@ -62,6 +64,10 @@ OPTFLAGS = -O2b2xg-
OS = mswin32
RT = msvcrt
+!ifndef RUBY_SO_NAME
+RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)17
+!endif
+
!if !defined(prefix)
prefix = /usr
!endif
@@ -155,7 +161,6 @@ OBJS = array.obj \
all: miniruby$(EXEEXT) rbconfig.rb \
$(LIBRUBY) $(MISCLIBS)
- set LIB=..\..;$(ORGLIBPATH)
@.\miniruby$(EXEEXT) $(srcdir)/ext/extmk.rb
ruby: $(PROGRAM)
@@ -301,7 +306,7 @@ s,@CC@,$(CC),;t t
s,@CPP@,$$(CC) -E,;t t
s,@YACC@,$(YACC),;t t
s,@RANLIB@,rem,;t t
-s,@AR@,lib -nologo,;t t
+s,@AR@,$(AR),;t t
s,@LN_S@,$(LN_S),;t t
s,@SET_MAKE@,$(SET_MAKE),;t t
s,@LIBOBJS@, acosh.obj crypt.obj win32.obj isinf.obj isnan.obj,;t t
@@ -337,22 +342,15 @@ s,@sitearch@,$(ARCH)-$(RT),;t t
s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t
s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t
s,@configure_input@,$$configure_input,;t t
+ @if not exist $(@D)\nul mkdir $(@D)
s,@srcdir@,$(srcdir),;t t
s,@top_srcdir@,$(srcdir),;t t
<<
-#ext/extmk.rb: $(srcdir)/ext/extmk.rb.in config.status
-# @echo Creating ext/extmk.rb
-# @.\miniruby$(EXEEXT) $(srcdir)/ext/configsub.rb \
-# -srcdir=$(srcdir) \
-# -install_name=$(RUBY_INSTALL_NAME) \
-# -so_name=$(RUBY_SO_NAME) \
-# -output=$@ $(srcdir)/ext/extmk.rb.in
-
-miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) $(EXTOBJS)
+miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) dmyext.obj
@echo $(EXTOBJS)
@echo $(LIBS)
- $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(OBJS) $(LIBS) -Fe$@
+ $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.obj $(OBJS) $(LIBS) -Fe$@
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $*.res
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $*.res \
@@ -363,21 +361,15 @@ $(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
-Fe$@ $(LIBRUBYARG) -link -stack:$(STACK) -subsystem:Windows -incremental:no
$(LIBRUBY_A): $(OBJS) dmyext.obj
- lib -nologo /OUT:$@ $(OBJS) dmyext.obj
+ $(AR) -out:$@ -machine:$(MACHINE) $(OBJS) dmyext.obj
$(LIBRUBY): $(RUBYDEF)
- lib -nologo /OUT:$@ /DEF:$(RUBYDEF)
+ $(AR) -out:$@ -def:$(RUBYDEF) -machine:$(MACHINE)
$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $@.res
- set LIB=.\win32;$(ORGLIBPATH)
$(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $@.res $(LIBS) \
-Fe$@ -link -dll -def:$(RUBYDEF)
-!if "$(LIBRUBY_SO)" != "rubymw.dll"
-rubymw.dll: $(LIBRUBY)
- $(CC) -nologo $(EXTOBJS) $(LIBRUBY) -o $@ -link /DLL /DEF:$(RUBYDEF)
-!endif
-
$(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
.\miniruby$(EXEEXT) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
@@ -452,9 +444,6 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(LIBRUBY_SO).rc: rbconfig.rb
-so_name=$(LIBRUBY_SO) \
. $(icondirs) $(srcdir)/win32
-#config.status: $(srcdir)/configure
-# $(SHELL) ./config.status --recheck
-
{$(srcdir)/missing}.c.obj:
$(CC) $(CFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/win32}.c.obj: