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

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

changed Config.h behavior

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