diff --git a/mex/build/matlab/mex.am b/mex/build/matlab/mex.am
index d4307e3bb3ceee9473485dbe913eb6314c88b6cb..5ba01b72306f8c083666f8f115302fe7d4c23249 100644
--- a/mex/build/matlab/mex.am
+++ b/mex/build/matlab/mex.am
@@ -29,10 +29,6 @@ clean-local:
 		cd $(top_srcdir)/../../matlab && rm -f $(PROGRAMS); \
 	fi
 
-# Automake provides a default rule for .f08 files, but not .F08.
-%.o: %.F08
-	$(AM_V_FC)$(FCCOMPILE) $(DEFS) -c -o $@ $<
-
 # Rules for the Fortran 2008 interface to MEX and BLAS/LAPACK functions
 matlab_mat.mod: matlab_mex.o
 matlab_mex.mod: matlab_mex.o
diff --git a/mex/build/octave/mex.am b/mex/build/octave/mex.am
index f98d1781a4c84b973f8f6049fadbab148a993bbd..1d8e1088f73ce2ed0bdc9328bb6c7ff37fc544da 100644
--- a/mex/build/octave/mex.am
+++ b/mex/build/octave/mex.am
@@ -36,10 +36,6 @@ clean-local:
 		cd $(top_srcdir)/../../octave && rm -f $(PROGRAMS); \
 	fi
 
-# Automake provides a default rule for .f08 files, but not .F08
-%.o: %.F08
-	$(AM_V_FC)$(FCCOMPILE) $(DEFS) -c -o $@ $<
-
 # Rules for the Fortran 2008 interface to MEX and BLAS/LAPACK functions
 matlab_mat.mod: matlab_mex.o
 matlab_mex.mod: matlab_mex.o