# Copyright (C) 2007, 2008 Peter Carbonetto. All Rights Reserved. # This code is published under the Common Public License. # # Author: Peter Carbonetto # Dept. of Computer Science # University of British Columbia # May 19, 2007 # INSTRUCTIONS: Please modify the following few variables. See the # readme.html file for more information. # This variable corresponds to the base directory of your MATLAB # installation. This is the directory so that in its 'bin/' # subdirectory you see all the matlab executables (such as 'matlab', # 'mex', etc.) #MATLAB_HOME = /usr/texbin/mex MATLAB_HOME = /Applications/tools/MATLAB_R2008bSV.app # Set the suffix for matlab mex files. The contents of the # $(MATLAB_HOME)/extern/examples/mex directory might be able to help # you in your choice. #MEXSUFFIX = mexglx # Linux 32-bit #MEXSUFFIX = mexmac # Mac OS X MEXSUFFIX = mexmaci # Mac OS X # This is the command used to call the mex program. Usually, it is # just "mex". But it also may be something like # /user/local/R2006b/bin/mex if "mex" doesn't work. MEX = mex MEX = /Applications/tools/MATLAB_R2008bSV.app/bin/mex ############################################################################# # Do not modify anything below unless you know what you're doing. CXX = g++-mp-4.3 CXXFLAGS = -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -DMATLAB_MEXFILE # -DMWINDEXISINT IPOPT_INCLUDE = -I${prefix}/include IPOPTLIBDIR = ${exec_prefix}/lib exec_prefix = ${prefix} prefix = /Applications/tools/coin-or/Ipopt-3.5.5 #LIBS = -L$(IPOPTLIBDIR) -lipopt -lpthread -llapack -lblas -lm -ldl -lcrt1.10.5.o -L/opt/local/lib/gcc43/gcc/i386-apple-darwin9.7.0/4.3.3 -L/opt/local/lib/gcc43/gcc/i386-apple-darwin9.7.0/4.3.3/../../.. -lgfortranbegin -lgfortran -lgcc_s.10.5 -lSystem LIBS = -L$(IPOPTLIBDIR) -lipopt -lpthread -llapack -lblas -lm -ldl -L/opt/local/lib/gcc43/gcc/i386-apple-darwin9.7.0/4.3.3 -L/opt/local/lib/gcc43/gcc/i386-apple-darwin9.7.0/4.3.3/../../.. -lgfortranbegin -lgfortran -lgcc_s.10.5 -lSystem TARGET = ipopt.$(MEXSUFFIX) OBJS = matlabexception.o matlabscalar.o \ matlabstring.o matlabjournal.o \ matlabmatrix.o arrayofmatrices.o \ sparsematrix.o matlabprogram.o \ matlaboption.o multipliers.o \ matlabfunctionhandle.o ipopt.o MATLAB_INCLUDE = -I$(MATLAB_HOME)/extern/include LDFLAGS = $(CXXFLAGS) MEXFLAGS = -v -cxx -O CC="$(CXX)" CXX="$(CXX)" LD="$(CXX)" \ COPTIMFLAGS="$(CXXFLAGS)" CXXOPTIMFLAGS="$(CXXFLAGS)" \ LDOPTIMFLAGS="$(LDFLAGS)" SRCDIR = ../../../../../Ipopt/contrib/MatlabInterface/src VPATH = $(SRCDIR) all: install %.o: %.cpp $(CXX) $(CXXFLAGS) $(IPOPT_INCLUDE) $(MATLAB_INCLUDE) -o $@ -c $^ $(TARGET): $(OBJS) $(MEX) $(MEXFLAGS) $(LIBS) -output $@ $^ install: $(TARGET) cp $(TARGET) .. clean: rm -f $(OBJS) $(TARGET)