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

Last change on this file since 1292 was 1292, checked in by bjarni, 12 years ago

Add CbcChooseVariable?.hpp and CbcCompare?.hpp to Makefile.am in the sandbox

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