--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -591,7 +591,7 @@ endif
 
 
 $(OBJDIR)/%.o: beam/%.c
-	$(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+	$(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
 
 else
 
