1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22PRJ=. 23 24PRJNAME=coinmp 25TARGET=coinmp 26 27# --- Settings ----------------------------------------------------- 28 29.INCLUDE : settings.mk 30 31# --- Files -------------------------------------------------------- 32 33.IF "$(ENABLE_COINMP)"!="YES" 34 35all: 36 @echo "CoinMP is disabled and will not be built." 37 38.ELIF "$(SYSTEM_COINMP)"=="YES" 39 40all: 41 @echo "Using system CoinMP. Does not have to be built." 42 43.ELSE 44 45TARFILE_NAME=CoinMP-1.8.4 46TARFILE_MD5=dd85ff540997a95ebb233bb5ae7bcc61 47 48# Only one patch survives the move from 1.7.6: the libtool freebsd1*/freebsd2* 49# glob fix (FreeBSD 10 and up match the pattern for FreeBSD 1) plus dropping a 50# CBC_SVN_REV printf. 1.8.4 still ships the old libtool, so it is still 51# needed, and all 127 hunks still apply. 52# 53# The other three are gone because 1.8.4 already contains them: 54# coinmp-1.7.6-clang.patch CoinSignal.hpp now uses __decltype(SIG_DFL) 55# throughout rather than bare typeof 56# coinmp-1.7.6-clang-1.8.patch Cbc_C_Interface.cpp now prints results as 57# static_cast<const void*> 58# coinmp-1.7.6-nopedantic.patch -pedantic-errors is no longer added by 59# coin.m4 or by any generated configure 60# Upstream packaging bug in 1.8.4: the v10 solution names its dependency 61# projects under MSVisualStudio\v9\ but with the .vcxproj extension, and the 62# v9 directories hold .vcproj -- so all seven paths point at files that do 63# not exist (MSB3202), the libraries never build, and CoinMP.def then fails 64# to resolve the Clp symbols it exports. 65PATCH_FILES=coinmp-1.8.4.patch coinmp-1.8.4-v10-sln-paths.patch 66.IF "$(OS)"=="OS2" 67PATCH_FILES+=coinmp-1.6.0-os2.patch 68.ENDIF 69 70# vcbuild.exe reads .vcproj and shipped with VS2005 and VS2008 only. VS2010 71# replaced it with MSBuild and changed the project format to .vcxproj at the 72# same time, so a modern toolset cannot use the v9 solution at all. CoinMP 73# ships both: v9 for vcbuild, v10 for MSBuild. Each toolset gets the pair it 74# can actually drive, which is also what keeps the VC9 command line identical 75# to what it has always been. 76.IF "$(COM)$(CPU)"=="MSCI" 77.IF "$(COMEX)"=="14" 78BUILD_ACTION=$(MSBUILD_PATH)$/MSBuild.exe CoinMP\\MSVisualStudio\\v10\\CoinMP.sln /p:Configuration=Release /p:Platform=Win32 /p:PlatformToolset=$(VCTOOLSET) /p:WindowsTargetPlatformVersion=$(WINDOWS_SDK_VERSION) 79.ELSE 80BUILD_ACTION=$(COMPATH)$/vcpackages$/vcbuild.exe -useenv CoinMP\\MSVisualStudio\\v9\\CoinMP.sln "Release|Win32" 81.ENDIF 82.ELIF "$(COM)$(CPU)"=="MSCX" 83.IF "$(COMEX)"=="14" 84BUILD_ACTION=$(MSBUILD_PATH)$/MSBuild.exe CoinMP\\MSVisualStudio\\v10\\CoinMP.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=$(VCTOOLSET) /p:WindowsTargetPlatformVersion=$(WINDOWS_SDK_VERSION) 85.ELSE 86BUILD_ACTION=$(COMPATH)$/vcpackages$/vcbuild.exe -useenv CoinMP\\MSVisualStudio\\v9\\CoinMP.sln "Release|x64" 87.ENDIF 88.ELSE 89CONFIGURE_ACTION=./configure 90#CONFIGURE_FLAGS=--disable-pkg-config --disable-bzlib --disable-zlib CC='$(CC) $(ARCH_FLAGS)' CXX='$(CXX) $(ARCH_FLAGS)' CFLAGS='$(ARCH_FLAGS) -Wc,-arch -Wc,i386' CPPFLAGS='$(ARCH_FLAGS)' LDFLAGS='$(ARCH_FLAGS)' compiler_flags='$(ARCH_FLAGS)' 91CONFIGURE_FLAGS=--disable-pkg-config --with-blas=BUILD --with-lapack=BUILD --disable-bzlib --disable-zlib CC='$(CC) $(ARCH_FLAGS)' CXX='$(CXX) $(ARCH_FLAGS)' 92.IF "$(OS)"=="MACOSX" 93# Each CoinMP sub-library (Osi, Clp, ...) depends on symbols from its siblings 94# (CoinUtils, ...). CoinMP's bundled 2013-era libtool only adds the Darwin 95# "-undefined dynamic_lookup" escape hatch for MACOSX_DEPLOYMENT_TARGET=10.x; 96# at 11.0+ (Apple Silicon baseline) that case falls through, leaving the flag 97# empty, so each .dylib is linked with unresolved sibling symbols and the 98# two-level-namespace linker rejects it ("symbol(s) not found for arm64"). 99# --enable-dependency-linking makes the inter-library dependencies explicit on 100# each link line (and sets -no-undefined), which is the correct fix. 101CONFIGURE_FLAGS+=--enable-dependency-linking 102.ENDIF 103#BUILD_ACTION= CC="$(CC) $(ARCH_FLAGS)" CPP="$(CXX) $(ARCH_FLAGS)" $(GNUMAKE) -j8 104BUILD_ACTION= $(GNUMAKE) -j$(MAXPROCESS) 105.ENDIF 106 107.IF "$(OS)"=="OS2" 108CONFIGURE_FLAGS+= --disable-shared --enable-static 109.ENDIF 110 111OUT2INC+=CoinMP$/src/CoinMP.h 112 113.IF "$(OS)$(CPU)"=="WNTI" 114.IF "$(COMEX)"=="14" 115OUT2BIN+=CoinMP$/MSVisualStudio$/v10$/Release$/CoinMP.dll 116OUT2LIB+=CoinMP$/MSVisualStudio$/v10$/Release$/CoinMP.lib 117.ELSE 118OUT2BIN+=CoinMP$/MSVisualStudio$/v9$/release$/CoinMP.dll 119OUT2LIB+=CoinMP$/MSVisualStudio$/v9$/release$/CoinMP.lib 120.ENDIF 121.ELIF "$(OS)$(CPU)"=="WNTX" 122.IF "$(COMEX)"=="14" 123OUT2BIN+=CoinMP$/MSVisualStudio$/v10$/x64$/Release$/CoinMP.dll 124OUT2LIB+=CoinMP$/MSVisualStudio$/v10$/x64$/Release$/CoinMP.lib 125.ELSE 126OUT2BIN+=CoinMP$/MSVisualStudio$/v9$/x64$/Release$/CoinMP.dll 127OUT2LIB+=CoinMP$/MSVisualStudio$/v9$/x64$/Release$/CoinMP.lib 128.ENDIF 129.ELIF "$(OS)"=="OS2" 130OUT2BIN+=CoinMP$/src$/CoinMP.dll 131OUT2LIB+=CoinMP$/src$/.libs/CoinMP.lib 132.ELSE 133OUT2LIB+=CoinMP$/src$/.libs$/libCoinMP*$(DLLPOST)* 134OUT2LIB+=CoinUtils$/src$/.libs$/libCoinUtils*$(DLLPOST)* 135OUT2LIB+=Cbc$/src$/.libs$/libCbc*$(DLLPOST)* 136OUT2LIB+=Cbc$/src$/OsiCbc$/.libs$/libOsiCbc*$(DLLPOST)* 137OUT2LIB+=Cgl$/src$/.libs$/libCgl*$(DLLPOST)* 138OUT2LIB+=Clp$/src$/.libs$/libClp*$(DLLPOST)* 139OUT2LIB+=Clp$/src$/OsiClp$/.libs$/libOsiClp*$(DLLPOST)* 140OUT2LIB+=Osi$/src$/Osi$/.libs$/libOsi*$(DLLPOST)* 141.ENDIF 142 143 144 145# --- Targets ------------------------------------------------------ 146 147.INCLUDE : set_ext.mk 148.INCLUDE : target.mk 149.INCLUDE : tg_ext.mk 150 151.ENDIF 152