source: trunk/Cbc/src/Makefile.am @ 866

Last change on this file since 866 was 866, checked in by tkr, 11 years ago

Fixing problems with changes to installation location for addlibs.txt file

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.6 KB
RevLine 
[765]1# Copyright (C) 2006, 2007 International Business Machines and others.
[311]2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: Makefile.am 866 2008-02-06 03:52:35Z tkr $
6
7# Author:  Andreas Waechter           IBM    2006-04-13
8
9AUTOMAKE_OPTIONS = foreign
10
11########################################################################
12#                               libCbc                                 #
13########################################################################
14
15# Name of the library compiled in this directory.  We want it to be installed
16# in the 'lib' directory
[765]17lib_LTLIBRARIES = libCbc.la libCbcSolver.la
[311]18
19# List all source files for this library, including headers
20libCbc_la_SOURCES = \
[454]21        Cbc_C_Interface.cpp Cbc_C_Interface.h \
[331]22        CbcConfig.h \
[311]23        CbcBranchActual.cpp CbcBranchActual.hpp \
24        CbcBranchBase.cpp CbcBranchBase.hpp \
25        CbcBranchCut.cpp CbcBranchCut.hpp \
26        CbcBranchDynamic.cpp CbcBranchDynamic.hpp \
27        CbcBranchLotsize.cpp CbcBranchLotsize.hpp \
28        CbcCompareActual.cpp CbcCompareActual.hpp \
29        CbcCompareBase.hpp \
30        CbcCountRowCut.cpp CbcCountRowCut.hpp \
31        CbcCutGenerator.cpp CbcCutGenerator.hpp \
32        CbcEventHandler.cpp CbcEventHandler.hpp \
33        CbcFathom.cpp CbcFathom.hpp \
34        CbcFathomDynamicProgramming.cpp CbcFathomDynamicProgramming.hpp \
35        CbcFeasibilityBase.hpp \
36        CbcHeuristic.cpp CbcHeuristic.hpp \
37        CbcHeuristicFPump.cpp CbcHeuristicFPump.hpp \
38        CbcHeuristicGreedy.cpp CbcHeuristicGreedy.hpp \
39        CbcHeuristicLocal.cpp CbcHeuristicLocal.hpp \
[640]40        CbcHeuristicRINS.cpp CbcHeuristicRINS.hpp \
[311]41        CbcMessage.cpp CbcMessage.hpp \
42        CbcModel.cpp CbcModel.hpp \
43        CbcNode.cpp CbcNode.hpp \
44        CbcStatistics.cpp CbcStatistics.hpp \
45        CbcStrategy.cpp CbcStrategy.hpp \
46        CbcTree.cpp CbcTree.hpp \
[765]47        CbcTreeLocal.cpp CbcTreeLocal.hpp
48
49libCbcSolver_la_SOURCES = \
50        CbcCbcParam.cpp \
51        Cbc_ampl.cpp Cbc_ampl.h \
52        ClpConstraintAmpl.hpp ClpAmplObjective.hpp ClpAmplStuff.cpp \
[640]53        CbcLinked.cpp CbcLinked.hpp \
[765]54        unitTestClp.cpp CbcSolver.cpp
[311]55
[765]56#Stefan: added unitTestClp.cpp because CbcSolver defines reference to it
57
[640]58## If we have the Ampl solver library, we need to add additional things
59## also see lower down
60## new idea is to add in source code anyway
[765]61##libCbc_la_SOURCES += Cbc_ampl.cpp Cbc_ampl.h
[640]62
63
[311]64# This is for libtool (on Windows)
[640]65
[328]66libCbc_la_LDFLAGS = $(LT_LDFLAGS)
[765]67libCbcSolver_la_LDFLAGS = $(LT_LDFLAGS)
[311]68
[640]69# Some common setup for cbc and cbc-generic.
70
71bin_PROGRAMS =
72AM_CPPFLAGS =
73
[866]74LIBS += `cat $(CGLOBJDIR)/cgl_addlibs.txt` \
75        `cat $(OSIOBJDIR)/osi_addlibs.txt` \
76        `cat $(COINUTILSOBJDIR)/coinutils_addlibs.txt` $(ADDLIBS)
[640]77
78
[312]79########################################################################
[640]80#                            cbc program                               #
81########################################################################
82
83if COIN_HAS_CLP
84
85# Name of the executable compiled in this directory.  We want it to be
86# installed in the 'bin' directory
87bin_PROGRAMS += cbc
88
89# List all source files for this executable, including headers
90cbc_SOURCES = \
[765]91        CoinSolve.cpp
[640]92
93# Additional COIN libraries
[765]94cbc_LDADD = libCbcSolver.la \
95        libCbc.la \
[640]96        $(CGLOBJDIR)/src/libCgl.la \
97        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
98        $(OSIOBJDIR)/src/libOsi.la \
99        $(CLPOBJDIR)/src/libClp.la \
100        $(COINUTILSOBJDIR)/src/libCoinUtils.la
101
102# Finally, the -rpath flag is used by libtool to make sure that the shared
103# library is found (in the lib install directory) when we are using dynamic
104# libraries.
105cbc_LDFLAGS = -rpath $(libdir)
106
107# Add locations of include files.
108
109AM_CPPFLAGS += -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
110        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
111        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc`
112LIBS  += `cat $(CLPOBJDIR)/clp_addlibs.txt`
113
114# If we have the Ampl solver library, we need to add additional things
115if COIN_HAS_ASL
116#cbc_SOURCES += Cbc_ampl.cpp Cbc_ampl.h
117cbc_LDADD += $(ASLLIB)
118AM_CPPFLAGS += $(ASL_CPPFLAGS) -DCOIN_HAS_ASL
119endif
120
121endif
122
123
124########################################################################
[372]125#                        cbc-generic program                           #
[312]126########################################################################
127
[640]128if CBC_BUILD_CBC_GENERIC
129
[312]130# Name of the executable compiled in this directory.  We want it to be
131# installed in the 'bin' directory
132
[640]133bin_PROGRAMS += cbc-generic
134
[312]135# List all source files for this executable, including headers
[640]136
[372]137cbc_generic_SOURCES = \
[640]138        CbcGenBaB.cpp \
139        CbcGenCbcParam.cpp CbcGenCbcParam.hpp CbcGenCbcParamUtils.cpp \
140        CbcGenCtlBlk.cpp CbcGenCtlBlk.hpp \
141        CbcGeneric.cpp \
142        CbcGenMessages.cpp CbcGenMessages.hpp \
143        CbcGenOsiParam.cpp CbcGenOsiParam.hpp CbcGenOsiParamUtils.cpp \
144        CbcGenParam.cpp CbcGenParam.hpp CbcGenParamUtils.cpp \
145        CbcGenSolution.cpp \
146        CbcGenSolvers.cpp
[312]147
[765]148cbc_generic_LDADD = libCbcSolver.la \
149        libCbc.la \
[640]150        $(CGLOBJDIR)/src/libCgl.la
[312]151
152# List all additionally required solver and Osi libraries
[640]153
[312]154if COIN_HAS_CLP
[345]155  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
[312]156        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
157        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc`
[372]158  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
[312]159        $(CLPOBJDIR)/src/libClp.la
160  LIBS  += `cat $(CLPOBJDIR)/clp_addlibs.txt`
161endif
162
163if COIN_HAS_CPX
[345]164  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)` \
[312]165        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx`
[372]166  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
[312]167endif
168
169if COIN_HAS_DYLP
[345]170  AM_CPPFLAGS += -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/DylpStdLib` \
[332]171        -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/Dylp` \
172        -I`$(CYGPATH_W) $(DYLPOBJDIR)/inc` \
[312]173        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiDylp`
[372]174  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiDylp/libOsiDylp.la \
[332]175        $(DYLPOBJDIR)/src/Dylp/libDylp.la
[312]176  LIBS += `cat $(DYLPOBJDIR)/dylp_addlibs.txt`
177endif
178
179if COIN_HAS_FMP
[345]180  AM_CPPFLAGS += -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiFmp`
[372]181  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiFmp/libOsiFmp.la
[312]182endif
183
184if COIN_HAS_GLPK
[345]185  AM_CPPFLAGS += -I`$(CYGPATH_W) $(GLPKINCDIR)` \
[312]186        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiGlpk`
[372]187  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiGlpk/libOsiGlpk.la
[312]188endif
189
190if COIN_HAS_MSK
[345]191  AM_CPPFLAGS += -I`$(CYGPATH_W) $(MSKINCDIR)` \
[312]192        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiMsk`
[372]193  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiMsk/libOsiMsk.la
[312]194endif
195
196if COIN_HAS_OSL
[345]197  AM_CPPFLAGS += -I`$(CYGPATH_W) $(OSLINCDIR)` \
[312]198        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiOsl`
[372]199  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiOsl/libOsiOsl.la
[312]200endif
201
202if COIN_HAS_SPX
[345]203  AM_CPPFLAGS += -I`$(CYGPATH_W) $(SPXINCDIR)` \
[312]204        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSpx`
[372]205  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiSpx/libOsiSpx.la
[312]206endif
207
[710]208if COIN_HAS_SYMPHONY
209  AM_CPPFLAGS += -I`$(CYGPATH_W) $(SYMPHONYSRCDIR)/src` \
[312]210        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSym`
[372]211  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiSym/libOsiSym.la \
[710]212        $(SYMPHONYOBJDIR)/src/libSym.la
213  LIBS += `cat $(SYMPHONYOBJDIR)/sym_addlibs.txt`
[312]214endif
215
216if COIN_HAS_VOL
[345]217  AM_CPPFLAGS += -I`$(CYGPATH_W) $(VOLSRCDIR)/src` \
[312]218        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiVol`
[372]219  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiVol/libOsiVol.la \
[312]220        $(VOLOBJDIR)/src/libVol.la
221  LIBS += `cat $(VOLOBJDIR)/vol_addlibs.txt`
222endif
223
224if COIN_HAS_XPR
[345]225  AM_CPPFLAGS += -I`$(CYGPATH_W) $(XPRINCDIR)` \
[312]226        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiXpr`
[372]227  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
[312]228endif
229
[765]230if COIN_HAS_ASL
231  cbc_generic_LDADD += $(ASLLIB)
232  AM_CPPFLAGS += $(ASL_CPPFLAGS) -DCOIN_HAS_ASL
233endif
234
[312]235# Finally the Osi Coin library (many of the above need it)
[372]236cbc_generic_LDADD += $(OSIOBJDIR)/src/libOsi.la \
[313]237        $(COINUTILSOBJDIR)/src/libCoinUtils.la
[312]238
239# Finally, the -rpath flag is used by libtool to make sure that the shared
240# library is found (in the lib install directory) when we are using dynamic
241# libraries.
[640]242
[372]243cbc_generic_LDFLAGS = -rpath $(libdir)
[312]244
[369]245endif
246
[312]247########################################################################
248#                            Additional flags                          #
249########################################################################
250
[311]251# Here list all include flags, relative to this "srcdir" directory.  This
252# "cygpath" stuff is necessary to compile with native compilers on Windows.
253# "top_srcdir" refers to the basic directory for the main package that is
254# being compiled.
[345]255AM_CPPFLAGS += \
[311]256        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
[312]257        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglClique` \
[356]258        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglDuplicateRow` \
[312]259        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglFlowCover` \
260        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglGomory` \
261        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglKnapsackCover` \
262        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding` \
263        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding2` \
264        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglOddHole` \
265        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglPreProcess` \
[311]266        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` \
[312]267        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglRedSplit` \
268        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglTwomir` \
[640]269        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglLandP` \
270        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglResidualCapacity` \
[313]271        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
[405]272        -I`$(CYGPATH_W) $(COINUTILSOBJDIR)/inc` \
273        -I`$(CYGPATH_W) $(OSISRCDIR)/src` \
274        -I`$(CYGPATH_W) $(OSIOBJDIR)/inc`
[311]275
[312]276# List additional defines
[345]277AM_CPPFLAGS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
[311]278
[324]279# This line is necessary to allow VPATH compilation with MS compilers
280# on Cygwin
281DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
282
[311]283########################################################################
284#                Headers that need to be installed                     #
285########################################################################
286
287# Here list all the header files that are required by a user of the library,
[846]288# and that therefore should be installed in 'install/coin'
289includecoindir = $(includedir)/coin
290includecoin_HEADERS = \
[333]291        ../inc/config_cbc.h \
[454]292        Cbc_C_Interface.h \
[311]293        CbcBranchActual.hpp \
294        CbcBranchBase.hpp \
[387]295        CbcBranchDynamic.hpp \
[333]296        CbcBranchLotsize.hpp \
297        CbcBranchCut.hpp \
[311]298        CbcCompareActual.hpp \
299        CbcCompareBase.hpp \
300        CbcCutGenerator.hpp \
[687]301        CbcFathom.hpp \
[311]302        CbcEventHandler.hpp \
[640]303        CbcFeasibilityBase.hpp \
[311]304        CbcHeuristic.hpp \
305        CbcHeuristicFPump.hpp \
306        CbcHeuristicGreedy.hpp \
307        CbcHeuristicLocal.hpp \
[640]308        CbcHeuristicRINS.hpp \
[311]309        CbcMessage.hpp \
310        CbcModel.hpp \
311        CbcNode.hpp \
312        CbcStrategy.hpp \
[783]313        CbcSolver.hpp \
[311]314        CbcTree.hpp \
[640]315        CbcLinked.hpp \
[687]316        CbcTreeLocal.hpp \
317        ClpConstraintAmpl.hpp \
318        ClpAmplObjective.hpp
[311]319
[325]320#############################################################################
321# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
322#############################################################################
[311]323
[325]324# You only need to adapt the following line
325ConfigHeader = CbcConfig.h
[311]326
[325]327install-exec-local:
328        echo "#ifndef HAVE_CONFIG_H" >bla
329        echo "#define HAVE_CONFIG_H" >>bla
330        echo "#endif" >> bla
331        cat $(srcdir)/$(ConfigHeader) >> bla
[846]332        $(install_sh_DATA) bla $(DESTDIR)$(includecoindir)/$(ConfigHeader)
[325]333        rm -f bla
[311]334
[325]335uninstall-local:
[846]336        rm -f $(DESTDIR)$(includecoindir)/$(ConfigHeader)
Note: See TracBrowser for help on using the repository browser.