source: trunk/Cbc/src/Makefile.am @ 454

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

changed Externals in trunk to point at stable instead releases in dependencies; install C interface header file

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