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

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

use proper automake variables for includes and #defines

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.8 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 345 2006-06-01 20:10:33Z 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
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_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_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_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_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_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_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_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_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_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_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_LDADD += $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
147endif
148
149# Finally the Osi Coin library (many of the above need it)
150cbc_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_LDFLAGS = -rpath $(libdir)
159
160########################################################################
161#                           solve 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 += 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.
198AM_CPPFLAGS += \
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
215AM_CPPFLAGS += -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        ../inc/config_cbc.h \
229        CbcBranchActual.hpp \
230        CbcBranchBase.hpp \
231        CbcBranchLotsize.hpp \
232        CbcBranchCut.hpp \
233        CbcCompareActual.hpp \
234        CbcCompareBase.hpp \
235        CbcCutGenerator.hpp \
236        CbcEventHandler.hpp \
237        CbcHeuristic.hpp \
238        CbcHeuristicFPump.hpp \
239        CbcHeuristicGreedy.hpp \
240        CbcHeuristicLocal.hpp \
241        CbcMessage.hpp \
242        CbcModel.hpp \
243        CbcNode.hpp \
244        CbcStrategy.hpp \
245        CbcTree.hpp \
246        CbcTreeLocal.hpp
247
248#############################################################################
249# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
250#############################################################################
251
252# You only need to adapt the following line
253ConfigHeader = CbcConfig.h
254
255install-exec-local:
256        echo "#ifndef HAVE_CONFIG_H" >bla
257        echo "#define HAVE_CONFIG_H" >>bla
258        echo "#endif" >> bla
259        cat $(srcdir)/$(ConfigHeader) >> bla
260        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
261        rm -f bla
262
263uninstall-local:
264        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
Note: See TracBrowser for help on using the repository browser.