Compile mexglx files

Hi all,

I am trying to compile the mexglx files in Ubuntu Festy. I got the CLAPACK library working and I was trying to make the mex files Dynare needs. The following Makefile creates one of the mexglx files. The problem I have is that when I use Dynare with this file I get lots of errors. I wonder if someone has the Makefile to compile the mexglx files for dynare in Linux.

MEXSUFFIX = mexglx
MATLABHOME = -I/usr/local/matlab7

MEX        = mex
CXX        = gcc
CFLAGS     = -fPIC -ansi -pthread -DMX_COMPAT_32 -DMATLAB_MEX_FILE

HOLA =/home/agonzago/Desktop/dyn_src/cLAPACK
LIBS = -L$(HOLA)/ $(HOLA)/lapack_LINUX.a -lcblaswr -lcblas -latlas -lg2c $(HOLA)/libF77.a $(HOLA)/libI77.a -lstdc++ -lm

INCLUDE   = -I$(MATLABHOME)/extern/include -I/usr/local/include
MEXFLAGS  = -cxx CC='$(CXX)' CXX='$(CXX)' LD='$(CXX)'

mjdgges.$(MEXSUFFIX): mjdgges.o
	$(MEX) $(MEXFLAGS) $(LIBS) -output mjdgges $^

	$(CXX) $(CFLAGS) $(INCLUDE) -c $^

Many thanks,

PD: Spaces in the Makefile are not correctly displayed.