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

Last change on this file since 595 was 595, checked in by forrest, 13 years ago

problem with ampl

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.0 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 595 2007-03-31 14:57:25Z 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        CbcGenOsiParam.cpp CbcGenOsiParam.hpp CbcGenOsiParamUtils.cpp \
135        CbcGenParam.cpp CbcGenParam.hpp CbcGenParamUtils.cpp \
136        CbcGenSolution.cpp \
137        CbcGenSolvers.cpp
138
139cbc_generic_LDADD = libCbc.la \
140        $(CGLOBJDIR)/src/libCgl.la
141
142# List all additionally required solver and Osi libraries
143
144if COIN_HAS_CLP
145  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
146        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
147        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc`
148  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
149        $(CLPOBJDIR)/src/libClp.la
150  LIBS  += `cat $(CLPOBJDIR)/clp_addlibs.txt`
151endif
152
153if COIN_HAS_CPX
154  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)` \
155        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx`
156  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
157endif
158
159if COIN_HAS_DYLP
160  AM_CPPFLAGS += -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/DylpStdLib` \
161        -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/Dylp` \
162        -I`$(CYGPATH_W) $(DYLPOBJDIR)/inc` \
163        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiDylp`
164  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiDylp/libOsiDylp.la \
165        $(DYLPOBJDIR)/src/Dylp/libDylp.la
166  LIBS += `cat $(DYLPOBJDIR)/dylp_addlibs.txt`
167endif
168
169if COIN_HAS_FMP
170  AM_CPPFLAGS += -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiFmp`
171  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiFmp/libOsiFmp.la
172endif
173
174if COIN_HAS_GLPK
175  AM_CPPFLAGS += -I`$(CYGPATH_W) $(GLPKINCDIR)` \
176        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiGlpk`
177  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiGlpk/libOsiGlpk.la
178endif
179
180if COIN_HAS_MSK
181  AM_CPPFLAGS += -I`$(CYGPATH_W) $(MSKINCDIR)` \
182        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiMsk`
183  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiMsk/libOsiMsk.la
184endif
185
186if COIN_HAS_OSL
187  AM_CPPFLAGS += -I`$(CYGPATH_W) $(OSLINCDIR)` \
188        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiOsl`
189  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiOsl/libOsiOsl.la
190endif
191
192if COIN_HAS_SPX
193  AM_CPPFLAGS += -I`$(CYGPATH_W) $(SPXINCDIR)` \
194        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSpx`
195  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiSpx/libOsiSpx.la
196endif
197
198if COIN_HAS_SYM
199  AM_CPPFLAGS += -I`$(CYGPATH_W) $(SYMSRCDIR)/src` \
200        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSym`
201  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiSym/libOsiSym.la \
202        $(SYMOBJDIR)/src/libSym.la
203  LIBS += `cat $(SYMOBJDIR)/sym_addlibs.txt`
204endif
205
206if COIN_HAS_VOL
207  AM_CPPFLAGS += -I`$(CYGPATH_W) $(VOLSRCDIR)/src` \
208        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiVol`
209  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiVol/libOsiVol.la \
210        $(VOLOBJDIR)/src/libVol.la
211  LIBS += `cat $(VOLOBJDIR)/vol_addlibs.txt`
212endif
213
214if COIN_HAS_XPR
215  AM_CPPFLAGS += -I`$(CYGPATH_W) $(XPRINCDIR)` \
216        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiXpr`
217  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
218endif
219
220# Finally the Osi Coin library (many of the above need it)
221cbc_generic_LDADD += $(OSIOBJDIR)/src/libOsi.la \
222        $(COINUTILSOBJDIR)/src/libCoinUtils.la
223
224# Finally, the -rpath flag is used by libtool to make sure that the shared
225# library is found (in the lib install directory) when we are using dynamic
226# libraries.
227
228cbc_generic_LDFLAGS = -rpath $(libdir)
229
230endif
231
232########################################################################
233#                            Additional flags                          #
234########################################################################
235
236# Here list all include flags, relative to this "srcdir" directory.  This
237# "cygpath" stuff is necessary to compile with native compilers on Windows.
238# "top_srcdir" refers to the basic directory for the main package that is
239# being compiled.
240AM_CPPFLAGS += \
241        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
242        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglClique` \
243        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglDuplicateRow` \
244        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglFlowCover` \
245        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglGomory` \
246        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglKnapsackCover` \
247        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding` \
248        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding2` \
249        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglOddHole` \
250        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglPreProcess` \
251        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` \
252        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglRedSplit` \
253        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglTwomir` \
254        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglLandP` \
255        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
256        -I`$(CYGPATH_W) $(COINUTILSOBJDIR)/inc` \
257        -I`$(CYGPATH_W) $(OSISRCDIR)/src` \
258        -I`$(CYGPATH_W) $(OSIOBJDIR)/inc`
259
260# List additional defines
261AM_CPPFLAGS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
262
263# This line is necessary to allow VPATH compilation with MS compilers
264# on Cygwin
265DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
266
267########################################################################
268#                Headers that need to be installed                     #
269########################################################################
270
271# Here list all the header files that are required by a user of the library,
272# and that therefore should be installed in 'install'
273include_HEADERS = \
274        ../inc/config_cbc.h \
275        Cbc_C_Interface.h \
276        CbcBranchActual.hpp \
277        CbcBranchBase.hpp \
278        CbcBranchDynamic.hpp \
279        CbcBranchLotsize.hpp \
280        CbcBranchCut.hpp \
281        CbcCompareActual.hpp \
282        CbcCompareBase.hpp \
283        CbcCutGenerator.hpp \
284        CbcEventHandler.hpp \
285        CbcFeasibilityBase.hpp \
286        CbcHeuristic.hpp \
287        CbcHeuristicFPump.hpp \
288        CbcHeuristicGreedy.hpp \
289        CbcHeuristicLocal.hpp \
290        CbcHeuristicRINS.hpp \
291        CbcMessage.hpp \
292        CbcModel.hpp \
293        CbcNode.hpp \
294        CbcStrategy.hpp \
295        CbcTree.hpp \
296        CbcLinked.hpp \
297        CbcTreeLocal.hpp
298
299#############################################################################
300# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
301#############################################################################
302
303# You only need to adapt the following line
304ConfigHeader = CbcConfig.h
305
306install-exec-local:
307        echo "#ifndef HAVE_CONFIG_H" >bla
308        echo "#define HAVE_CONFIG_H" >>bla
309        echo "#endif" >> bla
310        cat $(srcdir)/$(ConfigHeader) >> bla
311        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
312        rm -f bla
313
314uninstall-local:
315        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
Note: See TracBrowser for help on using the repository browser.