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

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

for lou and callable cbcmain

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