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

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

mostly try and simplify CbcOr?...

  • 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 414 2006-07-15 17:12:07Z 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        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        CbcCbcParam.cpp \
63        unitTest.cpp
64
65cbc_generic_LDADD = libCbc.la \
66        $(CGLOBJDIR)/src/libCgl.la \
67        $(OSIOBJDIR)/src/OsiCbc/libOsiCbc.la
68AM_CPPFLAGS = -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCbc`
69
70# List all additionally required solver and Osi libraries
71if COIN_HAS_CLP
72  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
73        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
74        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc`
75  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
76        $(CLPOBJDIR)/src/libClp.la
77  LIBS  += `cat $(CLPOBJDIR)/clp_addlibs.txt`
78endif
79
80if COIN_HAS_CPX
81  AM_CPPFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)` \
82        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx`
83  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
84endif
85
86if COIN_HAS_DYLP
87  AM_CPPFLAGS += -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/DylpStdLib` \
88        -I`$(CYGPATH_W) $(DYLPSRCDIR)/src/Dylp` \
89        -I`$(CYGPATH_W) $(DYLPOBJDIR)/inc` \
90        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiDylp`
91  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiDylp/libOsiDylp.la \
92        $(DYLPOBJDIR)/src/Dylp/libDylp.la
93  LIBS += `cat $(DYLPOBJDIR)/dylp_addlibs.txt`
94endif
95
96if COIN_HAS_FMP
97  AM_CPPFLAGS += -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiFmp`
98  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiFmp/libOsiFmp.la
99endif
100
101if COIN_HAS_GLPK
102  AM_CPPFLAGS += -I`$(CYGPATH_W) $(GLPKINCDIR)` \
103        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiGlpk`
104  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiGlpk/libOsiGlpk.la
105endif
106
107if COIN_HAS_MSK
108  AM_CPPFLAGS += -I`$(CYGPATH_W) $(MSKINCDIR)` \
109        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiMsk`
110  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiMsk/libOsiMsk.la
111endif
112
113if COIN_HAS_OSL
114  AM_CPPFLAGS += -I`$(CYGPATH_W) $(OSLINCDIR)` \
115        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiOsl`
116  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiOsl/libOsiOsl.la
117endif
118
119if COIN_HAS_SPX
120  AM_CPPFLAGS += -I`$(CYGPATH_W) $(SPXINCDIR)` \
121        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSpx`
122  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiSpx/libOsiSpx.la
123endif
124
125if COIN_HAS_SYM
126  AM_CPPFLAGS += -I`$(CYGPATH_W) $(SYMSRCDIR)/src` \
127        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSym`
128  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiSym/libOsiSym.la \
129        $(SYMOBJDIR)/src/libSym.la
130  LIBS += `cat $(SYMOBJDIR)/sym_addlibs.txt`
131endif
132
133if COIN_HAS_VOL
134  AM_CPPFLAGS += -I`$(CYGPATH_W) $(VOLSRCDIR)/src` \
135        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiVol`
136  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiVol/libOsiVol.la \
137        $(VOLOBJDIR)/src/libVol.la
138  LIBS += `cat $(VOLOBJDIR)/vol_addlibs.txt`
139endif
140
141if COIN_HAS_XPR
142  AM_CPPFLAGS += -I`$(CYGPATH_W) $(XPRINCDIR)` \
143        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiXpr`
144  cbc_generic_LDADD += $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
145endif
146
147# Finally the Osi Coin library (many of the above need it)
148cbc_generic_LDADD += $(OSIOBJDIR)/src/libOsi.la \
149        $(COINUTILSOBJDIR)/src/libCoinUtils.la
150LIBS += `cat $(OSIOBJDIR)/osi_addlibs.txt` \
151        `cat $(COINUTILSOBJDIR)/coinutils_addlibs.txt` $(ADDLIBS)
152
153# Finally, the -rpath flag is used by libtool to make sure that the shared
154# library is found (in the lib install directory) when we are using dynamic
155# libraries.
156cbc_generic_LDFLAGS = -rpath $(libdir)
157
158########################################################################
159#                            cbc program                               #
160########################################################################
161
162if COIN_HAS_CLP
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        CbcCbcParam.cpp \
172        unitTestClp.cpp
173
174# Additional COIN libraries
175cbc_LDADD = libCbc.la \
176        $(CGLOBJDIR)/src/libCgl.la \
177        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
178        $(OSIOBJDIR)/src/libOsi.la \
179        $(CLPOBJDIR)/src/libClp.la \
180        $(COINUTILSOBJDIR)/src/libCoinUtils.la
181
182# Finally, the -rpath flag is used by libtool to make sure that the shared
183# library is found (in the lib install directory) when we are using dynamic
184# libraries.
185cbc_LDFLAGS = -rpath $(libdir)
186
187# If we have the Ampl solver library, we need to add additional things
188if COIN_HAS_ASL
189cbc_SOURCES += Cbc_ampl.cpp Cbc_ampl.h
190cbc_LDADD += $(ASLLIB)
191AM_CPPFLAGS += $(ASL_CPPFLAGS)
192endif
193
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) $(COINUTILSOBJDIR)/inc` \
220        -I`$(CYGPATH_W) $(OSISRCDIR)/src` \
221        -I`$(CYGPATH_W) $(OSIOBJDIR)/inc`
222
223# List additional defines
224AM_CPPFLAGS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
225
226# This line is necessary to allow VPATH compilation with MS compilers
227# on Cygwin
228DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
229
230########################################################################
231#                Headers that need to be installed                     #
232########################################################################
233
234# Here list all the header files that are required by a user of the library,
235# and that therefore should be installed in 'install'
236include_HEADERS = \
237        ../inc/config_cbc.h \
238        CbcBranchActual.hpp \
239        CbcBranchBase.hpp \
240        CbcBranchDynamic.hpp \
241        CbcBranchLotsize.hpp \
242        CbcBranchCut.hpp \
243        CbcCompareActual.hpp \
244        CbcCompareBase.hpp \
245        CbcCutGenerator.hpp \
246        CbcEventHandler.hpp \
247        CbcFeasibilityBase.hpp \
248        CbcHeuristic.hpp \
249        CbcHeuristicFPump.hpp \
250        CbcHeuristicGreedy.hpp \
251        CbcHeuristicLocal.hpp \
252        CbcMessage.hpp \
253        CbcModel.hpp \
254        CbcNode.hpp \
255        CbcStrategy.hpp \
256        CbcTree.hpp \
257        CbcTreeLocal.hpp
258
259#############################################################################
260# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
261#############################################################################
262
263# You only need to adapt the following line
264ConfigHeader = CbcConfig.h
265
266install-exec-local:
267        echo "#ifndef HAVE_CONFIG_H" >bla
268        echo "#define HAVE_CONFIG_H" >>bla
269        echo "#endif" >> bla
270        cat $(srcdir)/$(ConfigHeader) >> bla
271        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
272        rm -f bla
273
274uninstall-local:
275        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
Note: See TracBrowser for help on using the repository browser.