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

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

nonlinear

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.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 496 2006-12-04 18:21:16Z 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        CbcMessage.cpp CbcMessage.hpp \
41        CbcModel.cpp CbcModel.hpp \
42        CbcNode.cpp CbcNode.hpp \
43        CbcStatistics.cpp CbcStatistics.hpp \
44        CbcStrategy.cpp CbcStrategy.hpp \
45        CbcTree.cpp CbcTree.hpp \
46        CbcLinked.cpp CbcLinked.hpp \
47        CbcTreeLocal.cpp CbcTreeLocal.hpp
48# If we have the Ampl solver library, we need to add additional things
49# also see lower down
50if COIN_HAS_ASL
51libCbc_la_SOURCES += Cbc_ampl.cpp Cbc_ampl.h
52endif
53
54# This is for libtool (on Windows)
55libCbc_la_LDFLAGS = $(LT_LDFLAGS)
56
57########################################################################
58#                        cbc-generic program                           #
59########################################################################
60
61# Name of the executable compiled in this directory.  We want it to be
62# installed in the 'bin' directory
63bin_PROGRAMS = cbc-generic
64
65# List all source files for this executable, including headers
66cbc_generic_SOURCES = \
67        CbcMain.cpp \
68        CbcParam.cpp CbcParam.hpp \
69        CbcCbcParam.cpp \
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########################################################################
166#                            cbc program                               #
167########################################################################
168
169if COIN_HAS_CLP
170
171# Name of the executable compiled in this directory.  We want it to be
172# installed in the 'bin' directory
173bin_PROGRAMS += cbc
174
175# List all source files for this executable, including headers
176cbc_SOURCES = \
177        CoinSolve.cpp \
178        CbcCbcParam.cpp \
179        unitTestClp.cpp
180
181# Additional COIN libraries
182cbc_LDADD = libCbc.la \
183        $(CGLOBJDIR)/src/libCgl.la \
184        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
185        $(OSIOBJDIR)/src/libOsi.la \
186        $(CLPOBJDIR)/src/libClp.la \
187        $(COINUTILSOBJDIR)/src/libCoinUtils.la
188
189# Finally, the -rpath flag is used by libtool to make sure that the shared
190# library is found (in the lib install directory) when we are using dynamic
191# libraries.
192cbc_LDFLAGS = -rpath $(libdir)
193
194# If we have the Ampl solver library, we need to add additional things
195if COIN_HAS_ASL
196cbc_LDADD += $(ASLLIB)
197AM_CPPFLAGS += $(ASL_CPPFLAGS)
198endif
199
200endif
201
202########################################################################
203#                            Additional flags                          #
204########################################################################
205
206# Here list all include flags, relative to this "srcdir" directory.  This
207# "cygpath" stuff is necessary to compile with native compilers on Windows.
208# "top_srcdir" refers to the basic directory for the main package that is
209# being compiled.
210AM_CPPFLAGS += \
211        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
212        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglClique` \
213        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglDuplicateRow` \
214        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglFlowCover` \
215        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglGomory` \
216        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglKnapsackCover` \
217        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding` \
218        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding2` \
219        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglOddHole` \
220        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglPreProcess` \
221        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` \
222        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglRedSplit` \
223        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglTwomir` \
224        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglLandP` \
225        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
226        -I`$(CYGPATH_W) $(COINUTILSOBJDIR)/inc` \
227        -I`$(CYGPATH_W) $(OSISRCDIR)/src` \
228        -I`$(CYGPATH_W) $(OSIOBJDIR)/inc`
229
230# List additional defines
231AM_CPPFLAGS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
232
233# This line is necessary to allow VPATH compilation with MS compilers
234# on Cygwin
235DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
236
237########################################################################
238#                Headers that need to be installed                     #
239########################################################################
240
241# Here list all the header files that are required by a user of the library,
242# and that therefore should be installed in 'install'
243include_HEADERS = \
244        ../inc/config_cbc.h \
245        Cbc_C_Interface.h \
246        CbcBranchActual.hpp \
247        CbcBranchBase.hpp \
248        CbcBranchDynamic.hpp \
249        CbcBranchLotsize.hpp \
250        CbcBranchCut.hpp \
251        CbcCompareActual.hpp \
252        CbcCompareBase.hpp \
253        CbcCutGenerator.hpp \
254        CbcEventHandler.hpp \
255        CbcFeasibilityBase.hpp \
256        CbcHeuristic.hpp \
257        CbcHeuristicFPump.hpp \
258        CbcHeuristicGreedy.hpp \
259        CbcHeuristicLocal.hpp \
260        CbcMessage.hpp \
261        CbcModel.hpp \
262        CbcNode.hpp \
263        CbcStrategy.hpp \
264        CbcTree.hpp \
265        CbcLinked.hpp \
266        CbcTreeLocal.hpp
267
268#############################################################################
269# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
270#############################################################################
271
272# You only need to adapt the following line
273ConfigHeader = CbcConfig.h
274
275install-exec-local:
276        echo "#ifndef HAVE_CONFIG_H" >bla
277        echo "#define HAVE_CONFIG_H" >>bla
278        echo "#endif" >> bla
279        cat $(srcdir)/$(ConfigHeader) >> bla
280        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
281        rm -f bla
282
283uninstall-local:
284        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
Note: See TracBrowser for help on using the repository browser.