--- a/src/Makefile
+++ b/src/Makefile
@@ -9,9 +9,6 @@
 # Octave - global install  (e.g. from debian package)
 OCTAVE_VERSION = 
 INCOCTAVE = -I /usr/include/octave 
-# Octave - local install (e.g. compiled from sources) 
-OCTAVE_VERSION = -3.4.0
-INCOCTAVE = -I /usr/local/include/octave$(OCTAVE_VERSION)/octave 
 
 # Matlab configuration
 MATLABDIR = /usr/local/MATLAB/R2010b
@@ -37,8 +34,8 @@
 
 PROGS = histo_mex.mex covm_mex.mex kth_element.mex sumskipnan_mex.mex str2array.mex train.mex svmtrain_mex.mex svmpredict_mex.mex xptopen.mex 
 
-MEX_EXT = $(shell $(MATLABDIR)/bin/mexext)
 octave: $(PROGS)
+MEX_EXT = '.mex'
 matlab: $(patsubst %.mex, %.$(MEX_EXT), $(PROGS))
 mexw32 win32:  $(patsubst %.mex, %.mexw32, $(PROGS))
 all:    octave matlab win32
