summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-28 14:47:44 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-28 14:47:44 +0000
commit65579c6b315efc508e41be5f42a334f2f747a557 (patch)
tree0de43f6fda0a0cb44df5c5bfd83775fe1f1c6158 /ext/extmk.rb.in
parent03f06165b89da07b41d4bea133c55d554b3be47d (diff)
* ext/extmk.rb.in, lib/mkmf.rb: add C++ rules in addition to C
rules for the mswin32 platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in17
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 8e6b804..a4d4c57 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -512,14 +512,29 @@ EOS
mfile.print "
{$(srcdir)}.c{}.@OBJEXT@:
$(CC) -I. -I$(<D) $(CFLAGS) $(CPPFLAGS) -c $(<:/=\\)
-
.c.@OBJEXT@:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(<:/=\\)
+
+{$(srcdir)}.cc{}.@OBJEXT@:
+ $(CXX) -I. -I$(<D) $(CXXFLAGS) $(CPPFLAGS) -c $(<:/=\\)
+.cc.@OBJEXT@:
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(<:/=\\)
+{$(srcdir)}.cpp{}.@OBJEXT@:
+ $(CXX) -I. -I$(<D) $(CXXFLAGS) $(CPPFLAGS) -c $(<:/=\\)
+.cpp.@OBJEXT@:
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(<:/=\\)
+{$(srcdir)}.cxx{}.@OBJEXT@:
+ $(CXX) -I. -I$(<D) $(CXXFLAGS) $(CPPFLAGS) -c $(<:/=\\)
+.cxx.@OBJEXT@:
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(<:/=\\)
"
else
mfile.print "
.c.@OBJEXT@:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(subst /,\\\\,$<)
+
+.cc.@OBJEXT@ .cpp.@OBJEXT@ .cxx.@OBJEXT@ .C.@OBJEXT@:
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(subst /,\\\\,$<)
"
end