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

Last change on this file since 748 was 748, checked in by stefan, 13 years ago

add unitTestClp.cpp to libCbc to have CbcClpUnitTest? well defined

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