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

Last change on this file since 464 was 443, checked in by andreasw, 13 years ago

merged changeset 442 from stable/1.1 into branches/devel

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