diff --git a/template/Makefile.in b/template/Makefile.in index 27dcd8e385..60a068dadf 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -277,7 +277,7 @@ miniruby$(EXEEXT): $(PROGRAM): @$(RM) $@ $(ECHO) linking $@ - $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@ + $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@ $(Q) $(POSTLINK) PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(gnumake:yes=exec) $(RM) $(LIBRUBY_EXTS) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 2eb6292390..a1242363f7 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1093,9 +1093,8 @@ miniruby.rc: !if "$(PROGRAM)" != "" $(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res $(ECHO) linking $(@:\=/) - $(Q) $(PURIFY) $(CC) $(MAINOBJ) \ - $(RUBY_INSTALL_NAME).res $(OUTFLAG)$@ $(LIBRUBYARG) \ - -link $(LDFLAGS) $(XLDFLAGS) + $(Q) $(PURIFY) $(CC) $(MAINOBJ) $(EXTOBJS) $(RUBY_INSTALL_NAME).res \ + $(OUTFLAG)$@ $(LIBRUBYARG) -link $(LDFLAGS) $(XLDFLAGS) $(Q) $(LDSHARED_0) $(Q) $(LDSHARED_1) $(Q) $(LDSHARED_2)