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

Last change on this file since 912 was 912, checked in by ladanyi, 13 years ago

Incorporated changes from branches/heur

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