diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-11 16:30:03 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-11 16:30:03 +0000 |
commit | 5e1ee25ad88ea9e89966a9156a8b7d3353f81de2 (patch) | |
tree | e269d84b4790c5e77d11b1a97ca46c8f7b60d84c /win32 | |
parent | 90985c411919bbc4ca197d400fb3e47f9195a389 (diff) | |
download | ruby-5e1ee25ad88ea9e89966a9156a8b7d3353f81de2.tar.gz |
* configure.in, lib/mkmf.rb, win32/Makefile.sub (CSRCFLAG): make the
compiler option replacable in Makefile.
* win32/Makefile.sub (OUTFLAG, COUTFLAG): ditto.
* win32/Makeile.sub, win32/setup.mak (CC): should not append `-nologo`
option forcely.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile.sub | 43 | ||||
-rw-r--r-- | win32/setup.mak | 5 |
2 files changed, 28 insertions, 20 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub index d2f89eea5f..c8692888ad 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -65,7 +65,7 @@ iconinc=-I$(icondirs: = -I) .SUFFIXES: .def .lib !if !defined(CC) -CC = cl +CC = cl -nologo !endif !if !defined(CPP) || "$(CPP)" == "cl" CPP = $(CC) -E @@ -200,8 +200,15 @@ DOCTARGETS = nodoc ! endif !endif +!if !defined(OUTFLAG) OUTFLAG = -Fe +!endif +!if !defined(COUTFLAG) COUTFLAG = -Fo +!endif +!if !defined(CSRCFLAG) +CSRCFLAG = -Tc +!endif !if !defined(RUNTIMEFLAG) RUNTIMEFLAG = -MD !endif @@ -256,7 +263,6 @@ MISSING = $(MISSING) explicit_bzero.obj DLNOBJ = dln.obj ARFLAGS = -machine:$(MACHINE) -out: -CC = $(CC) -nologo LD = $(CC) LDSHARED = $(LD) -LD XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing $(XCFLAGS) @@ -906,6 +912,7 @@ s,@ENABLE_SHARED@,yes,;t t s,@BASERUBY@,$(BASERUBY),;t t s,@OUTFLAG@,$(OUTFLAG),;t t s,@COUTFLAG@,$(COUTFLAG),;t t +s,@CSRCFLAG@,$(CSRCFLAG),;t t s,@CPPOUTFILE@,-P,;t t s,@LIBPATHFLAG@, -libpath:%s,;t t s,@RPATHFLAG@,,;t t @@ -916,9 +923,9 @@ s,@LINK_SO@,@if exist $$(@).manifest $$(RUBY) -run -e wait_writable -- -n 10 $$( s,@LINK_SO@,@if exist $$(@).manifest $(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=\).manifest,;t t !endif -s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t +s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c $$(CSRCFLAG)$$(<:\=/),;t t s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t -s,@ASSEMBLE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -Fa$$(@) -c -Tc$$(<:\=/),;t t +s,@ASSEMBLE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -Fa$$(@) -c $$(CSRCFLAG)$$(<:\=/),;t t s,@ASSEMBLE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -Fa$$(@) -c -Tp$$(<:\=/),;t t s,@COMPILE_RULES@,{$$(*VPATH*)}.%s.%s: .%s.%s:,;t t s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t @@ -1087,48 +1094,48 @@ $(ruby_pc): $(RBCONFIG) {$(srcdir)/enc/trans}.c.obj: $(ECHO) compiling $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/) {$(srcdir)/enc}.c.obj: $(ECHO) compiling $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/) {$(srcdir)/missing}.c.obj: $(ECHO) compiling $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/) {$(win_srcdir)}.c.obj: $(ECHO) compiling $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/) {$(srcdir)}.c{}.obj: $(ECHO) compiling $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/) .c.obj: $(ECHO) compiling $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/) {$(srcdir)/missing}.c.asm: $(ECHO) translating $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/) {$(win_srcdir)}.c.asm: $(ECHO) translating $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/) {$(srcdir)}.c{}.asm: $(ECHO) translating $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/) .c.asm: $(ECHO) translating $(<:\=/) - $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c -Tc$(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/) {$(srcdir)/missing}.c.i: $(ECHO) preprocessing $(<:\=/) - $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P -Tc$(<:\=/) > $@ + $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/) > $@ {$(win_srcdir)}.c.i: $(ECHO) preprocessing $(<:\=/) - $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P -Tc$(<:\=/) + $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/) {$(srcdir)}.c{}.i: $(ECHO) preprocessing $(<:\=/) - $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P -Tc$(<:\=/) + $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/) .c.i: $(ECHO) preprocessing $(<:\=/) - $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P -Tc$(<:\=/) + $(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/) .rc.res: $(ECHO) compiling $(<:\=/) diff --git a/win32/setup.mak b/win32/setup.mak index b023f8df91..78683fedda 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -212,13 +212,14 @@ MACHINE = x86 # RUBY_INSTALL_NAME = ruby # RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR) -# CFLAGS = -nologo -MD $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) -# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\" +# CFLAGS = $$(RUNTIMEFLAG) $$(DEBUGFLAGS) $$(WARNFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) $$(COMPILERFLAG) +# CPPFLAGS = # STACK = 0x2000000 # LDFLAGS = $$(CFLAGS) -Fm # XLDFLAGS = # RFLAGS = -r # EXTLIBS = +CC = cl -nologo $(BANG)include $$(srcdir)/win32/Makefile.sub << |