source: branches/sandbox/Cbc/src/Makefile.am @ 1293

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