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

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

renamed CBc executables

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