source: branches/devel/Cbc/src/Makefile.am @ 618

Last change on this file since 618 was 618, checked in by forrest, 12 years ago

add residual cuts

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