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

Last change on this file since 1132 was 1132, checked in by forrest, 10 years ago

chnages to try and make faster

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