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

Last change on this file since 405 was 405, checked in by andreasw, 14 years ago

updated according to changes in BuildTools?; included some bugfixes provided by Lou Hafer

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