summaryrefslogtreecommitdiff
path: root/win32/Makefile.sub
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-30 09:23:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-30 09:23:15 +0000
commit2ffedb5f291d8d420ff3a197bba62bd3b329a1db (patch)
treebe26a0fa1baebe9e587b1a79dd01a3e8c25ce951 /win32/Makefile.sub
parent5f0902a0981de05fa9b93d92bff9ea9b4089e0fa (diff)
* win32/Makefile.sub: VC++8 support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile.sub')
-rw-r--r--win32/Makefile.sub14
1 files changed, 12 insertions, 2 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 4a24039..1e881f1 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -56,18 +56,20 @@ PROCESSOR_LEVEL = 5
!if 6 < $(PROCESSOR_LEVEL)
PROCESSOR_LEVEL = 6
!endif
+!if $(MSC_VER) < 1400
PROCESSOR_FLAG = -G$(PROCESSOR_LEVEL)
+!endif
CPU = i$(PROCESSOR_LEVEL)86
ARCH = i386
!else
CPU = $(PROCESSOR_ARCHITECTURE)
ARCH = $(PROCESSOR_ARCHITECTURE)
!endif
-!if !defined(DEBUGFLAGS)
+!if !defined(DEBUGFLAGS) && $(MSC_VER) < 1400
DEBUGFLAGS = -Zi
!endif
!if !defined(OPTFLAGS)
-OPTFLAGS = -O2b2xg-
+OPTFLAGS = -O2b2xty-
!endif
!if !defined(OS)
OS = mswin32
@@ -132,6 +134,11 @@ CC = $(CC) -nologo
LD = $(CC)
LDSHARED = $(LD) -LD
XCFLAGS = -DRUBY_EXPORT -I. -I$(srcdir) -I$(srcdir)/missing
+!if $(MSC_VER) >= 1400
+# Prevents VC++ 2005 (cl ver 14) warnings
+CPPFLAGS = $(CPPFLAGS) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+!endif
+
DLDFLAGS = $(LDFLAGS) -dll
SOLIBS =
@@ -184,6 +191,9 @@ config.status: $(CONFIG_H)
$(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub
@echo Creating config.h
@$(srcdir:/=\)\win32\ifchange.bat config.h <<
+#if _MSC_VER != $(MSC_VER)
+#error MSC version unmatch
+#endif
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1