diff --git a/common.mk b/common.mk index b3b0972432..aae11a25f6 100644 --- a/common.mk +++ b/common.mk @@ -835,6 +835,7 @@ $(PLATFORM_D): exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time miniruby$(EXEEXT) $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(@F) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ $< + $(Q) $(POSTLINK) $(Q) ./miniruby$(EXEEXT) \ -e 'prog, dest = ARGV; dest += "/ruby"' \ -e 'unless prog=="ruby"' \ diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 3c9fc07648..becc6c2057 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -323,6 +323,7 @@ MJIT_DEBUGFLAGS = $(DEBUGFLAGS) MJIT_LDSHARED = $(MJIT_CC) -LD !endif +POSTLINK = DLDFLAGS = $(LDFLAGS) -dll MAINLIBS = $(LIBS) SOLIBS =