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

Last change on this file since 1121 was 1121, checked in by forrest, 11 years ago

compiler warnings, deterministic parallel and stability

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