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

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

mostly for rins

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