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

Last change on this file since 846 was 846, checked in by andreasw, 12 years ago

merged recent COIN-wide changes in stable into trunk and reran autotools

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