diff --git a/boostregex/nppSpecifics.mak b/boostregex/nppSpecifics.mak
index 4da427033333..0a692f9a6756 100644
--- a/boostregex/nppSpecifics.mak
+++ b/boostregex/nppSpecifics.mak
@@ -1,6 +1,6 @@
 # This makefile should be included in the main scintilla.mak file,
-# just after where LOBJS is defined (around line 
-# 
+# just after where LOBJS is defined (around line
+#
 # The following line should be added around line 211 of scintilla.mak
 # !INCLUDE nppSpecifics.mak
 
@@ -19,8 +19,8 @@ CXXFLAGS=$(CXXFLAGS) -DSCI_OWNREGEX
 
 
 $(DIR_O)\UTF8DocumentIterator.obj:: ../../boostregex/UTF8DocumentIterator.cxx
-	$(CC) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c ../../boostregex/UTF8DocumentIterator.cxx	
-	
-$(DIR_O)\BoostRegexSearch.obj:: ../../boostregex/BoostRegexSearch.cxx ../src/CharClassify.h ../src/RESearch.h	
-	$(CC) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c ../../boostregex/BoostRegexSearch.cxx
+	$(CXX) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c -Fo$@ %s
+
+$(DIR_O)\BoostRegexSearch.obj:: ../../boostregex/BoostRegexSearch.cxx ../src/CharClassify.h ../src/RESearch.h
+	$(CXX) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c -Fo$@ %s