|
| 1 | +export MACOSX_DEPLOYMENT_TARGET="10.9" |
| 2 | +export CFLAGS="-fPIC -Ofast -DNDEBUG -ffast-math -mmacosx-version-min=10.9" |
| 3 | +export CXXFLAGS="-fPIC -Og -DNDEBUG -ffast-math -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.9" |
| 4 | +export F77FLAGS="-fPIC -Ofast -DNDEBUG -ffast-math" |
| 5 | +export LDFLAGS="-fPIC -Ofast -DNDEBUG -ffast-math" |
| 6 | + |
| 7 | +DIR=`pwd` |
| 8 | +OUTDIR="/opt/cbc/bin" |
| 9 | +export PKG_CONFIG_PATH="${OUTDIR}/lib/pkgconfig/:${PKG_CONFIG_PATH}" |
| 10 | + |
| 11 | +echo |
| 12 | +echo "Making and installing Glpk" |
| 13 | +cd ${DIR}/ThirdParty-Glpk |
| 14 | +./configure --prefix=${OUTDIR}/ --enable-static --disable-shared |
| 15 | +git pull |
| 16 | +make |
| 17 | +make install |
| 18 | + |
| 19 | +echo |
| 20 | +echo "Making and installing Lapack" |
| 21 | +cd ${DIR}/ThirdParty-Lapack |
| 22 | +./configure --prefix=${OUTDIR}/ --enable-static --disable-shared |
| 23 | +git pull |
| 24 | +make |
| 25 | +make install |
| 26 | + |
| 27 | +echo |
| 28 | +echo "Making and installing Blas" |
| 29 | +cd ${DIR}/ThirdParty-Blas |
| 30 | +./configure --prefix=${OUTDIR}/ --enable-static --disable-shared |
| 31 | +git pull |
| 32 | +make |
| 33 | +make install |
| 34 | + |
| 35 | +echo |
| 36 | +echo "Making and installing CoinUtils" |
| 37 | +cd ${DIR}/CoinUtils |
| 38 | +./configure --prefix=${OUTDIR}/ --enable-static --disable-shared |
| 39 | +git pull |
| 40 | +make |
| 41 | +make install |
| 42 | + |
| 43 | +echo |
| 44 | +echo "Making and installing Osi" |
| 45 | +cd ${DIR}/Osi |
| 46 | +./configure --prefix=${OUTDIR}/ --enable-static --disable-shared |
| 47 | +git pull |
| 48 | +make |
| 49 | +make install |
| 50 | + |
| 51 | +echo |
| 52 | +echo "Making and installing Clp" |
| 53 | +cd ${DIR}/Clp |
| 54 | +./configure --prefix=${OUTDIR}/ --enable-static --disable-shared |
| 55 | +git pull |
| 56 | +make |
| 57 | +make install |
| 58 | + |
| 59 | +echo |
| 60 | +echo "Making and installing Cgl" |
| 61 | +cd ${DIR}/Cgl |
| 62 | +./configure --prefix=${OUTDIR}/ --enable-static --disable-shared |
| 63 | +git pull |
| 64 | +make |
| 65 | +make install |
| 66 | + |
| 67 | +echo |
| 68 | +echo "Making and installing Cbc" |
| 69 | +cd ${DIR}/Cbc |
| 70 | +./configure --prefix=${OUTDIR}/ --enable-cbc-parallel --enable-static --disable-shared |
| 71 | +git pull |
| 72 | +make |
| 73 | +make install |
| 74 | + |
| 75 | +echo |
| 76 | +echo "Compiling dynamic library" |
| 77 | +cd ${DIR} |
| 78 | +clang++ -shared -Ofast -fPIC -o cbc-c-darwin-arm64.dylib \ |
| 79 | + -I${OUTDIR}/include/coin-or/ -I${OUTDIR}/include/coin-or/glpk -I${OUTDIR}/include/coin \ |
| 80 | + -L${OUTDIR}/lib \ |
| 81 | + ./Cbc/src/Cbc_C_Interface.cpp \ |
| 82 | + -lCbc -lCgl -lClp -lCoinUtils -lOsi -lOsiCbc -lOsiClp -lOsiGlpk \ |
| 83 | + -lcoinblas -lcoinglpk -lcoinlapack \ |
| 84 | + -lbz2 -lz -llapack ${CXXFLAGS} -stdlib=libc++ -lreadline |
| 85 | +echo "Done!" |
0 commit comments