Compile mexglx files
Posted: Fri Oct 05, 2007 4:19 am
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.
[code]
MEXSUFFIX = mexglx
MATLABHOME = -I/usr/local/matlab7
[code]
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 $^
mjdgges.o: mjdgges.cc
$(CXX) $(CFLAGS) $(INCLUDE) -c $^
[/code]
Many thanks,
Andres
PD: Spaces in the Makefile are not correctly displayed.
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.
[code]
MEXSUFFIX = mexglx
MATLABHOME = -I/usr/local/matlab7
[code]
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 $^
mjdgges.o: mjdgges.cc
$(CXX) $(CFLAGS) $(INCLUDE) -c $^
[/code]
Many thanks,
Andres
PD: Spaces in the Makefile are not correctly displayed.