Changeset 294 for trunk


Ignore:
Timestamp:
Mar 31, 2006 5:21:48 PM (14 years ago)
Author:
lou
Message:

Correct handling of libCbc, libOsiCbc, libVol.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r286 r294  
    8383# $(warning CBC_DEFINES is $(CBC_DEFINES))
    8484
    85 # Pull together the full dependency list for libCbc. You can't build libCbc
    86 # without the Coin, Osi, and Cgl libraries. If Clp is included in CBC_SOLVERS,
    87 # we'll need to build it too. Note that the current (06.03.22) Osi makefile
    88 # will use Makefile.location to determine which solvers and OSI interfaces
    89 # to build. This means that building Osi (which we need for libCbc) will
    90 # trigger the builds of all the specified solvers. Oh well, we want them
    91 # anyway.
     85# Pull together a dependency list for libCbc. You can't build libCbc without
     86# the Coin, Osi, and Cgl libraries.  The current (06.03.22) Osi makefile will
     87# use the set of solvers enabled in Makefile.location to determine which OSI
     88# interfaces to build. To make a long story short, since you can't add a solver
     89# to CBC_SOLVERS unless it's enabled in Makefile.location, we don't need to
     90# explicitly trigger a build for solver XXX, or for interface OsiXXX. Nor can
     91# we suppress the build of OsiCbc. (But note that disabling OsiCbc in
     92# Makefile.location will exclude it from the link of the cbc main program.) If
     93# this behaviour ever changes, the target list here will need to be upgraded to
     94# include XXX and OsiXXX for solvers XXX in CBC_SOLVERS.
    9295
    93 libTgts := Coin Osi
     96libTgts := Coin Osi Cgl
    9497
    95 ifneq ($(filter Clp,$(CBC_SOLVERS)),)
    96   libTgts += Clp Osi/OsiClp
    97 endif
    98 
    99 libTgts += Cgl
    100 
    101 $(warning Complete dependency list is $(libTgts))
     98# $(warning Dependency list is $(libTgts))
    10299
    103100###############################################################################
  • trunk/Test/Makefile

    r289 r294  
    1717default: solver
    1818
     19# In spite of what you might think, OsiCbc will be built. See the explanation
     20# in ../Makefile. The exclusion here is just a hedge against change.
    1921
    2022cbc:
     23ifneq ($(filter COIN_libOsiCbc,$(CoinLibsDefined)),)
    2124        (cd $(CoinDir)/Osi/OsiCbc && $(MAKE) -f Makefile.lightweight install)
     25endif
    2226        ${MAKE} -f Makefile.test $@
    2327
  • trunk/Test/Makefile.test

    r289 r294  
    1515include ${MakefileDir}/Makefile.coin
    1616
    17 # Include files, library directory and name, compile-time defines.
    18 
    19 # Start out with empty vars. If for no other reason, we need this to establish
    20 # these variables as simply expanded.
    21 
    22 IncDir :=
    23 LibDir :=
    24 LibName :=
    25 Define := $(CBC_DEFINES)
    26 
    27 
    28 # Cbc should build without OsiCbc, but you can't run the miplib test suite
    29 # without it.
     17# cbc will build without OsiCbc, but you can't run the miplib test suite
     18# without it. Disabling OsiCbc in Makefile.location simply excludes OsiCbc from
     19# the link. In the current COIN makefile architecture, building Cbc and Osi
     20# leads inevitably to building OsiCbc.
    3021
    3122ifneq ($(filter COIN_libOsiCbc,$(CoinLibsDefined)),)
     
    3829endif
    3930
    40 $(warning CBC_SOLVERS is $(CBC_SOLVERS))
     31# Include files, library directory and name, compile-time defines.  Start out
     32# by adding libCbc.
    4133
    42 # Add the requested solver libraries: libXXX and libOsiXXX. If Clp is in the
    43 # mix, and COIN_HAS_VOL is defined, we need to bring libVol into the mix (but
    44 # not OsiVol).
     34IncDir := $(CbcIncDir)
     35LibDir := $(CbcLibDir)
     36LibName := $(CbcLibName)
     37Define := $(CBC_DEFINES) $(CbcDefine)
    4538
    46 IncDir += $(foreach lib,$(CBC_SOLVERS),$($(lib)IncDir))
    47 LibDir += $(foreach lib,$(CBC_SOLVERS),$($(lib)LibDir))
    48 LibName += $(foreach lib,$(CBC_SOLVERS),$($(lib)LibName))
    49 ifneq ($(filter COIN_libVol,$(CoinLibsDefined)),)
    50   LibDir += $(VolLibDir)
    51   LibName += $(VolLibName)
     39# Add the requested libOsiXXX libraries.
     40
     41IncDir += $(foreach solver,$(CBC_SOLVERS),$(Osi$(solver)IncDir))
     42LibDir += $(foreach solver,$(CBC_SOLVERS),$(Osi$(solver)LibDir))
     43LibName += $(foreach solver,$(CBC_SOLVERS),$(Osi$(solver)LibName))
     44Define += $(foreach solver,$(CBC_SOLVERS),$(Osi$(solver)Define))
     45
     46# Add the requested libXXX libraries (excepting libCbc, which is already in).
     47
     48CBC_SOLVERS := $(filter-out Cbc,$(CBC_SOLVERS))
     49IncDir += $(foreach solver,$(CBC_SOLVERS),$($(solver)IncDir))
     50LibDir += $(foreach solver,$(CBC_SOLVERS),$($(solver)LibDir))
     51LibName += $(foreach solver,$(CBC_SOLVERS),$($(solver)LibName))
     52Define += $(foreach lib,$(CBC_SOLVERS),$($(lib)Define))
     53
     54# If Clp is in the mix, and Vol is available, we need to bring libVol
     55# into the mix. (Only the library is required.)
     56
     57ifneq ($(filter Clp,$(CBC_SOLVERS)),)
     58  ifneq ($(filter COIN_libVol,$(CoinLibsDefined)),)
     59    LibDir += $(VolLibDir)
     60    LibName += $(VolLibName)
     61  endif
    5262endif
    53 Define += $(foreach lib,$(CBC_SOLVERS),$($(lib)Define))
    54 IncDir += $(foreach lib,$(CBC_SOLVERS),$(Osi$(lib)IncDir))
    55 LibDir += $(foreach lib,$(CBC_SOLVERS),$(Osi$(lib)LibDir))
    56 LibName += $(foreach lib,$(CBC_SOLVERS),$(Osi$(lib)LibName))
    57 Define += $(foreach lib,$(CBC_SOLVERS),$(Osi$(lib)Define))
    5863
    59 # Add the required libraries: Coin, Osi, Cgl
     64# Add the required base libraries: Cgl, Osi, and Coin.
    6065
    6166IncDir += $(foreach lib,Cgl Osi Coin,$($(lib)IncDir))
Note: See TracChangeset for help on using the changeset viewer.