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

Last change on this file since 1301 was 1301, checked in by EdwinStraver, 10 years ago

Broke up the objects form CbcBranchBase?

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