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

Last change on this file since 316 was 316, checked in by andreasw, 14 years ago

minor corrections

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 8.9 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 316 2006-05-13 15:49:06Z 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 $(COINUTILSOBJDIR)/coinutils_addlibs.txt` $(ADDLIBS)
150
151# Finally, the -rpath flag is used by libtool to make sure that the shared
152# library is found (in the lib install directory) when we are using dynamic
153# libraries.
154cbc_LDFLAGS = -rpath $(libdir)
155
156########################################################################
157#                           solve program                              #
158########################################################################
159
160#ToDo: I'm not sure if I'm doing the right thing here
161
162# Name of the executable compiled in this directory.  We want it to be
163# installed in the 'bin' directory
164bin_PROGRAMS += solve
165
166# List all source files for this executable, including headers
167solve_SOURCES = \
168        CoinSolve.cpp \
169        Cbc_ampl.cpp Cbc_ampl.h \
170        unitTestClp.cpp
171
172# The following file is not to be distributed, since it is "borrowed" from Clp
173nodist_solve_SOURCES = CbcOrClpParam.cpp
174
175# Additional COIN libraries
176solve_LDADD = libCbc.la \
177        $(CGLOBJDIR)/src/libCgl.la \
178        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
179        $(OSIOBJDIR)/src/libOsi.la \
180        $(CLPOBJDIR)/src/libClp.la \
181        $(COINUTILSOBJDIR)/src/libCoinUtils.la
182
183# Finally, the -rpath flag is used by libtool to make sure that the shared
184# library is found (in the lib install directory) when we are using dynamic
185# libraries.
186solve_LDFLAGS = -rpath $(libdir)
187
188########################################################################
189#                            Additional flags                          #
190########################################################################
191
192# Here list all include flags, relative to this "srcdir" directory.  This
193# "cygpath" stuff is necessary to compile with native compilers on Windows.
194# "top_srcdir" refers to the basic directory for the main package that is
195# being compiled.
196CXXFLAGS += \
197        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
198        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglClique` \
199        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglFlowCover` \
200        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglGomory` \
201        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglKnapsackCover` \
202        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding` \
203        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding2` \
204        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglOddHole` \
205        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglPreProcess` \
206        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` \
207        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglRedSplit` \
208        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglTwomir` \
209        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
210        -I`$(CYGPATH_W) $(OSISRCDIR)/src`
211
212# List additional defines
213DEFS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
214
215########################################################################
216#                Headers that need to be installed                     #
217########################################################################
218
219# Here list all the header files that are required by a user of the library,
220# and that therefore should be installed in 'install'
221include_HEADERS = \
222        CbcBranchActual.hpp \
223        CbcBranchBase.hpp \
224        CbcCompareActual.hpp \
225        CbcCompareBase.hpp \
226        CbcCutGenerator.hpp \
227        CbcEventHandler.hpp \
228        CbcHeuristic.hpp \
229        CbcHeuristicFPump.hpp \
230        CbcHeuristicGreedy.hpp \
231        CbcHeuristicLocal.hpp \
232        CbcMessage.hpp \
233        CbcModel.hpp \
234        CbcNode.hpp \
235        CbcStrategy.hpp \
236        CbcTree.hpp \
237        CbcTreeLocal.hpp
238
239########################################################################
240#     Generating the configure header that is to be distributed        #
241########################################################################
242
243CONFIG_DIST = CbcConfig.hpp
244CONFIG_H = config_cbc.h
245$(libCbc_la_OBJECTS) $(cbc_OBJECTS) $(solve_OBJECTS): ../inc/$(CONFIG_DIST)
246
247nodist_include_HEADERS = ../inc/$(CONFIG_DIST)
248
249../inc/$(CONFIG_DIST): ../inc/$(CONFIG_H)
250        echo "/** Required defines from $(CONFIG_H) */" >bla.tmp
251        echo "#ifndef __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
252        echo "#define __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
253        $(EGREP) 'COIN_|CBC_DEFAULT_SOLVER' $< >>bla.tmp
254        echo "#endif" >>bla.tmp
255        if test -r ../inc/$(CONFIG_DIST); then \
256          if diff ./inc/$(CONFIG_DIST) bla.tmp >/dev/null 2>1 ; then \
257            rm -f bla.tmp; \
258          else \
259            rm -f ../inc/$(CONFIG_DIST); \
260            mv bla.tmp ../inc/$(CONFIG_DIST); \
261          fi; \
262        else \
263          mv bla.tmp ../inc/$(CONFIG_DIST); \
264        fi
265
266CLEANFILES = bla.tmp
267
268DISTCLEANFILES = ../inc/$(CONFIG_DIST)
Note: See TracBrowser for help on using the repository browser.