1#
2# Unix/Linux Makefile for MATLAB interface to levmar
3#
4
5MEX=mex
6MEXCFLAGS=-I.. -O #-g
7# WHEN USING LAPACK, CHANGE THE NEXT TWO LINES TO WHERE YOUR COMPILED LAPACK/BLAS & F2C LIBS ARE!
8LAPACKBLASLIBS_PATH=/usr/lib
9F2CLIBS_PATH=/usr/local/lib
10
11
12# I had to specify the absolute path to the libs, otherwise mex linked against their dynamic versions...
13INTFACESRCS=levmar.c
14LAPACKLIBS=$(LAPACKBLASLIBS_PATH)/liblapack.a $(LAPACKBLASLIBS_PATH)/libblas.a $(F2CLIBS_PATH)/libf2c.a
15                                 # On systems with a FORTRAN (not f2c'ed) version of LAPACK, libf2c.a is
16                                 # not necessary; on others, libf2c.a comes in two parts: libF77.a and libI77.a
17
18LIBS=$(LAPACKLIBS)
19
20dummy: $(INTFACESRCS)
21	$(MEX) $(MEXCFLAGS) $(INTFACESRCS) ../liblevmar.a $(LIBS)
22
23clean:
24	@rm -f levmar.mexglx
25
26depend:
27	makedepend -f Makefile $(INTFACESRCS)
28
29# DO NOT DELETE THIS LINE -- make depend depends on it.
30
31