source: branches/BSP/trunk/Cbc/src/Makefile.am @ 752

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

fixing linking issues with ASL (temporary fix)

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