source: branches/sandbox/Cbc/src/Makefile.am @ 1299

Last change on this file since 1299 was 1299, checked in by bjarni, 10 years ago

Final fix on the Makefile.am, now sandbox compiles ok

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