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

Last change on this file since 1455 was 1455, checked in by lou, 9 years ago

Add CbcCompareBase?.hpp to includecoin_HEADERS; clear Ticket #94.

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