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

Last change on this file since 331 was 331, checked in by andreasw, 15 years ago

list Config.h file for distribution

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 8.6 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 331 2006-05-22 23:46:05Z 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 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
57
58# List all source files for this executable, including headers
59cbc_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_SOURCES = CbcOrClpParam.cpp
66
67cbc_LDADD = libCbc.la \
68        $(CGLOBJDIR)/src/libCgl.la \
69        $(OSIOBJDIR)/src/OsiCbc/libOsiCbc.la
70CXXFLAGS += -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCbc`
71
72# List all additionally required solver and Osi libraries
73if COIN_HAS_CLP
74  CXXFLAGS += -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
75        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
76        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc`
77  cbc_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  CXXFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)` \
84        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx`
85  cbc_LDADD += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
86endif
87
88if COIN_HAS_DYLP
89  CXXFLAGS += -I`$(CYGPATH_W) $(DYLPSRCDIR)/src` \
90        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiDylp`
91  cbc_LDADD += $(OSIOBJDIR)/src/OsiDylp/libOsiDylp.la \
92        $(DYLPOBJDIR)/src/libDylp.la
93  LIBS += `cat $(DYLPOBJDIR)/dylp_addlibs.txt`
94endif
95
96if COIN_HAS_FMP
97  CXXFLAGS += -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiFmp`
98  cbc_LDADD += $(OSIOBJDIR)/src/OsiFmp/libOsiFmp.la
99endif
100
101if COIN_HAS_GLPK
102  CXXFLAGS += -I`$(CYGPATH_W) $(GLPKINCDIR)` \
103        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiGlpk`
104  cbc_LDADD += $(OSIOBJDIR)/src/OsiGlpk/libOsiGlpk.la
105endif
106
107if COIN_HAS_MSK
108  CXXFLAGS += -I`$(CYGPATH_W) $(MSKINCDIR)` \
109        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiMsk`
110  cbc_LDADD += $(OSIOBJDIR)/src/OsiMsk/libOsiMsk.la
111endif
112
113if COIN_HAS_OSL
114  CXXFLAGS += -I`$(CYGPATH_W) $(OSLINCDIR)` \
115        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiOsl`
116  cbc_LDADD += $(OSIOBJDIR)/src/OsiOsl/libOsiOsl.la
117endif
118
119if COIN_HAS_SPX
120  CXXFLAGS += -I`$(CYGPATH_W) $(SPXINCDIR)` \
121        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSpx`
122  cbc_LDADD += $(OSIOBJDIR)/src/OsiSpx/libOsiSpx.la
123endif
124
125if COIN_HAS_SYM
126  CXXFLAGS += -I`$(CYGPATH_W) $(SYMSRCDIR)/src` \
127        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSym`
128  cbc_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  CXXFLAGS += -I`$(CYGPATH_W) $(VOLSRCDIR)/src` \
135        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiVol`
136  cbc_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  CXXFLAGS += -I`$(CYGPATH_W) $(XPRINCDIR)` \
143        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiXpr`
144  cbc_LDADD += $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
145endif
146
147# Finally the Osi Coin library (many of the above need it)
148cbc_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_LDFLAGS = -rpath $(libdir)
157
158########################################################################
159#                           solve program                              #
160########################################################################
161
162#ToDo: I'm not sure if I'm doing the right thing here
163
164# Name of the executable compiled in this directory.  We want it to be
165# installed in the 'bin' directory
166bin_PROGRAMS += solve
167
168# List all source files for this executable, including headers
169solve_SOURCES = \
170        CoinSolve.cpp \
171        Cbc_ampl.cpp Cbc_ampl.h \
172        unitTestClp.cpp
173
174# The following file is not to be distributed, since it is "borrowed" from Clp
175nodist_solve_SOURCES = CbcOrClpParam.cpp
176
177# Additional COIN libraries
178solve_LDADD = libCbc.la \
179        $(CGLOBJDIR)/src/libCgl.la \
180        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
181        $(OSIOBJDIR)/src/libOsi.la \
182        $(CLPOBJDIR)/src/libClp.la \
183        $(COINUTILSOBJDIR)/src/libCoinUtils.la
184
185# Finally, the -rpath flag is used by libtool to make sure that the shared
186# library is found (in the lib install directory) when we are using dynamic
187# libraries.
188solve_LDFLAGS = -rpath $(libdir)
189
190########################################################################
191#                            Additional flags                          #
192########################################################################
193
194# Here list all include flags, relative to this "srcdir" directory.  This
195# "cygpath" stuff is necessary to compile with native compilers on Windows.
196# "top_srcdir" refers to the basic directory for the main package that is
197# being compiled.
198CXXFLAGS += \
199        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
200        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglClique` \
201        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglFlowCover` \
202        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglGomory` \
203        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglKnapsackCover` \
204        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding` \
205        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding2` \
206        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglOddHole` \
207        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglPreProcess` \
208        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` \
209        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglRedSplit` \
210        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglTwomir` \
211        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
212        -I`$(CYGPATH_W) $(OSISRCDIR)/src`
213
214# List additional defines
215DEFS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
216
217# This line is necessary to allow VPATH compilation with MS compilers
218# on Cygwin
219DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
220
221########################################################################
222#                Headers that need to be installed                     #
223########################################################################
224
225# Here list all the header files that are required by a user of the library,
226# and that therefore should be installed in 'install'
227include_HEADERS = \
228        CbcBranchActual.hpp \
229        CbcBranchBase.hpp \
230        CbcCompareActual.hpp \
231        CbcCompareBase.hpp \
232        CbcCutGenerator.hpp \
233        CbcEventHandler.hpp \
234        CbcHeuristic.hpp \
235        CbcHeuristicFPump.hpp \
236        CbcHeuristicGreedy.hpp \
237        CbcHeuristicLocal.hpp \
238        CbcMessage.hpp \
239        CbcModel.hpp \
240        CbcNode.hpp \
241        CbcStrategy.hpp \
242        CbcTree.hpp \
243        CbcTreeLocal.hpp
244
245#############################################################################
246# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
247#############################################################################
248
249# You only need to adapt the following line
250ConfigHeader = CbcConfig.h
251
252install-exec-local:
253        echo "#ifndef HAVE_CONFIG_H" >bla
254        echo "#define HAVE_CONFIG_H" >>bla
255        echo "#endif" >> bla
256        cat $(srcdir)/$(ConfigHeader) >> bla
257        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
258        rm -f bla
259
260uninstall-local:
261        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
Note: See TracBrowser for help on using the repository browser.