/usr/share/sdpa/mex/Makefile is in sdpam 7.3.9+dfsg-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | #
# SDPA-M: $Revision: 7.3 $
#
# For Matlab
# $ make
# For Octave
# $ make COMPILE_ENVIRONMENT=octave
# after "make install", you can find
# 'make.inc' in 'share/sdpa' sub-directory under the installed directory
# For example
# make MAKE_INCLUDE_DIR=/usr/share/sdpa
# or
# make MAKE_INCLUDE_DIR=/usr/local/share/sdpa
# In addition, for Octave, you should try
# make MAKE_INCLUDE_DIR=/usr/local/share/sdpa COMPILE_ENVIRONMENT=octave
# To compile with mingw, the following command is a sample.
# Your need to modify directory names and compiler names.
# make MEX="i586-mingw32msvc-g++ -shared" COMPILE_ENVIRONMENT=octave \
# PRINTF_INT_STYLE=-DPRINTF_INT_STYLE=\\\"%zd\\\" \
# OUTPUT_FORMAT="-o \$@.mexw32" \
# MATLAB_INCLUDE="-Imatlab-extern/include" \
# MATLAB_LIBS="-I/matlab-extern/microsoft/libmx.lib -I/matlab-extern/microsoft/libmex.lib" \
# for only SDPA-Project members
# set DEVELOPEMENT_STAGE=1 to compile without 'make install'
# For example
# make MAKE_INCLUDE_DIR=../etc DEVELOPEMENT_STAGE=1
# In addition, for Octave, you should try
# make MAKE_INCLUDE_DIR=../etc DEVELOPEMENT_STAGE=1 COMPILE_ENVIRONMENT=octave
# This file is a component of SDPA
# Copyright (C) 2004-2013 SDPA Project
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
MAKE_INCLUDE_DIR=..
-include ${MAKE_INCLUDE_DIR}/make.inc
# after "make install", you can find
# 'make.inc' in 'share/sdpa' sub-directory under the installed directory
# For example
# make MAKE_INCLUDE_DIR=/usr/share/sdpa
# or
# make MAKE_INCLUDE_DIR=/usr/local/share/sdpa
# Set manually the following MEX full path
MEX = "auto"
# for Linux (depends on version)
#MEX = /usr/local/matlab/MatlabR2008b/bin/mex
# for Mac (depends on version)
OS = $(shell uname)
ifeq ($(OS),Darwin)
MEX = /Applications/MATLAB_R2008b.app/bin/mex
endif
# ---- USUALLY just 'mex' is used
MEX = mex
# Automatic search MEX full path by invoking matlab
ifeq ($(MEX),"auto")
MEX = ${shell matlab -nodisplay -r "s=matlabroot; fprintf('%s\n',s);exit" | tail -2 | head -1 }/bin/mex
endif
MATLAB_LAPACK = -lmwlapack -lmwblas
DEF_FPIC = -fPIC
ARCH = $(shell uname -m)
CXXFLAGSOPTIONS = CXXFLAGS="-Wall ${DEF_FPIC}" -O -DNDEBUG CC=${CC} CXX=${CXX}
LARGEARRAYOPTION = -largeArrayDims
SDPA_INCLUDE = -I${SDPA_DIR}/include
ifeq ($(DEVELOPEMENT_STAGE),1)
SDPA_INCLUDE = -I..
SDPA_LIB = ../libsdpa.a
endif
ALL_INCLUDE = ${SDPA_INCLUDE} ${MUMPS_INCLUDE} ${PTHREAD_INCLUDE}
# ALL_LIBS = ${SDPA_LIB} ${MUMPS_LIBS} ${MATLAB_LAPACK} ${FCLIBS}
ALL_LIBS = ${SDPA_LIB} ${MUMPS_LIBS} ${LAPACK_LIBS} ${BLAS_LIBS} ${PTHREAD_LIBS} ${FCLIBS}
PRINTF_INT_STYLE = -DPRINTF_INT_STYLE=\\\"%zd\\\"
# Output format is usually automatically set by mex command.
OUTPUT_FORMAT =
ifeq ($(COMPILE_ENVIRONMENT),octave)
MEX = CC=${CC} CXX=${CXX} CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" CPPFLAGS="${CPPFLAGS}" mkoctfile --mex
CXXFLAGSOPTIONS =
LARGEARRAYOPTION =
PRINTF_INT_STYLE = -DPRINTF_INT_STYLE=\\\"%d\\\"
endif
ALL_OPTION = ${CXXFLAGSOPTIONS} ${LARGEARRAYOPTION} ${PRINTF_INT_STYLE}
all: mexsdpa mexSedumiWrap mexAggSDPcones mexDisAggSDPsol mexWriteSedumiToSDPA mexReadSDPAToSedumi mexReadOutput
# all: mexSedumiWrap
mexBinaryCheck:
@echo "---------------------------------------------"
@echo "Mex Compilation Start "
@echo "---------------------------------------------"
@if [ -f $(MEX) ]; then \
echo "---------------------------------------------" ;\
echo " We use " ;\
echo " " $(MEX) ;\
echo " for Mex compilaton " ;\
echo "---------------------------------------------" ;\
else \
echo "---------------------------------------------" ;\
echo "Automatic search is failed, " ;\
echo " Set the full path for mex command mannually " ;\
echo " in "`pwd`"/Makekefile" ;\
echo " and try 'make' in `pwd` " ;\
echo "---------------------------------------------" ;\
false ;\
fi
mexsdpa:
${MEX} ${ALL_OPTION} \
${OUTPUT_FORMAT} \
${ALL_INCLUDE} ${MATLAB_INCLUDE} \
mexsdpa.cpp mexFprintf.c \
${MATLAB_LIBS} ${ALL_LIBS}
mexSedumiWrap:
${MEX} ${ALL_OPTION} \
${OUTPUT_FORMAT} \
${ALL_INCLUDE} ${MATLAB_INCLUDE} \
mexSedumiWrap.cpp mexFprintf.c \
${MATLAB_LIBS} ${ALL_LIBS}
mexAggSDPcones:
${MEX} \
${OUTPUT_FORMAT} \
${ALL_OPTION} ${MATLAB_INCLUDE} \
mexAggSDPcones.cpp mexFprintf.c ${MATLAB_LIBS}
mexDisAggSDPsol:
${MEX} \
${OUTPUT_FORMAT} \
${ALL_OPTION} ${MATLAB_INCLUDE} \
mexDisAggSDPsol.cpp mexFprintf.c ${MATLAB_LIBS}
mexWriteSedumiToSDPA:
${MEX} \
${OUTPUT_FORMAT} \
${ALL_OPTION} ${MATLAB_INCLUDE} \
mexWriteSedumiToSDPA.cpp ${MATLAB_LIBS}
mexReadSDPAToSedumi:
${MEX} \
${OUTPUT_FORMAT} \
${ALL_OPTION} ${MATLAB_INCLUDE} \
mexReadSDPAToSedumi.cpp ${MATLAB_LIBS}
mexReadOutput:
${MEX} \
${OUTPUT_FORMAT} \
${ALL_OPTION} ${MATLAB_INCLUDE} \
mexReadOutput.cpp ${MATLAB_LIBS}
# clean all generated files
clean:
rm -f *~
rm -f mexsdpa.mex* mexSedumiWrap.mex*
rm -f mexAggSDPcones.mex* mexDisAggSDPsol.mex*
rm -f mexFprintf.mex*
rm -f mexWriteSedumiToSDPA.mex*
rm -f mexReadSDPAToSedumi.mex* mexReadOutput.mex*
distclean: clean
#
# End of File
#
|