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

Last change on this file since 710 was 710, checked in by lou, 12 years ago

Support for ThirdParty/Glpk?. Correct detection of SYMPHONY, should it ever be
pulled in as an external.

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