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

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

renamed CoinBase? to CoinUtils?; minor other changes

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 9.0 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 315 2006-05-13 15:14:34Z 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
69# List all additionally required solver and Osi libraries
70if COIN_HAS_CLP
71  CXXFLAGS += -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
72        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
73        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc`
74  cbc_LDADD += $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
75        $(CLPOBJDIR)/src/libClp.la
76  LIBS  += `cat $(CLPOBJDIR)/clp_addlibs.txt`
77endif
78
79if COIN_HAS_CBC
80  CXXFLAGS += -I`$(CYGPATH_W) $(CBCSRCDIR)/src` \
81        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCbc`
82  cbc_LDADD += $(OSIOBJDIR)/src/OsiCbc/libOsiCbc.la \
83        $(CBCOBJDIR)/src/libCbc.la
84  LIBS += `cat $(CBCOBJDIR)/cbc_addlibs.txt`
85endif
86
87if COIN_HAS_CPX
88  CXXFLAGS += -I`$(CYGPATH_W) $(CPXINCDIR)` \
89        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx`
90  cbc_LDADD += $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la
91endif
92
93if COIN_HAS_DYLP
94  CXXFLAGS += -I`$(CYGPATH_W) $(DYLPSRCDIR)/src` \
95        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiDylp`
96  cbc_LDADD += $(OSIOBJDIR)/src/OsiDylp/libOsiDylp.la \
97        $(DYLPOBJDIR)/src/libDylp.la
98  LIBS += `cat $(DYLPOBJDIR)/dylp_addlibs.txt`
99endif
100
101if COIN_HAS_FMP
102  CXXFLAGS += -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiFmp`
103  cbc_LDADD += $(OSIOBJDIR)/src/OsiFmp/libOsiFmp.la
104endif
105
106if COIN_HAS_GLPK
107  CXXFLAGS += -I`$(CYGPATH_W) $(GLPKINCDIR)` \
108        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiGlpk`
109  cbc_LDADD += $(OSIOBJDIR)/src/OsiGlpk/libOsiGlpk.la
110endif
111
112if COIN_HAS_MSK
113  CXXFLAGS += -I`$(CYGPATH_W) $(MSKINCDIR)` \
114        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiMsk`
115  cbc_LDADD += $(OSIOBJDIR)/src/OsiMsk/libOsiMsk.la
116endif
117
118if COIN_HAS_OSL
119  CXXFLAGS += -I`$(CYGPATH_W) $(OSLINCDIR)` \
120        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiOsl`
121  cbc_LDADD += $(OSIOBJDIR)/src/OsiOsl/libOsiOsl.la
122endif
123
124if COIN_HAS_SPX
125  CXXFLAGS += -I`$(CYGPATH_W) $(SPXINCDIR)` \
126        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSpx`
127  cbc_LDADD += $(OSIOBJDIR)/src/OsiSpx/libOsiSpx.la
128endif
129
130if COIN_HAS_SYM
131  CXXFLAGS += -I`$(CYGPATH_W) $(SYMSRCDIR)/src` \
132        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiSym`
133  cbc_LDADD += $(OSIOBJDIR)/src/OsiSym/libOsiSym.la \
134        $(SYMOBJDIR)/src/libSym.la
135  LIBS += `cat $(SYMOBJDIR)/sym_addlibs.txt`
136endif
137
138if COIN_HAS_VOL
139  CXXFLAGS += -I`$(CYGPATH_W) $(VOLSRCDIR)/src` \
140        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiVol`
141  cbc_LDADD += $(OSIOBJDIR)/src/OsiVol/libOsiVol.la \
142        $(VOLOBJDIR)/src/libVol.la
143  LIBS += `cat $(VOLOBJDIR)/vol_addlibs.txt`
144endif
145
146if COIN_HAS_XPR
147  CXXFLAGS += -I`$(CYGPATH_W) $(XPRINCDIR)` \
148        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiXpr`
149  cbc_LDADD += $(OSIOBJDIR)/src/OsiXpr/libOsiXpr.la
150endif
151
152# Finally the Osi Coin library (many of the above need it)
153cbc_LDADD += $(OSIOBJDIR)/src/libOsi.la \
154        $(COINUTILSOBJDIR)/src/libCoinUtils.la
155LIBS += `cat $(COINUTILSOBJDIR)/coinutils_addlibs.txt` $(ADDLIBS)
156
157# Finally, the -rpath flag is used by libtool to make sure that the shared
158# library is found (in the lib install directory) when we are using dynamic
159# libraries.
160cbc_LDFLAGS = -rpath $(libdir)
161
162########################################################################
163#                           solve program                              #
164########################################################################
165
166#ToDo: I'm not sure if I'm doing the right thing here
167
168# Name of the executable compiled in this directory.  We want it to be
169# installed in the 'bin' directory
170bin_PROGRAMS += solve
171
172# List all source files for this executable, including headers
173solve_SOURCES = \
174        CoinSolve.cpp \
175        Cbc_ampl.cpp Cbc_ampl.h \
176        unitTestClp.cpp
177
178# The following file is not to be distributed, since it is "borrowed" from Clp
179nodist_solve_SOURCES = CbcOrClpParam.cpp
180
181# Additional COIN libraries
182solve_LDADD = libCbc.la \
183        $(CGLOBJDIR)/src/libCgl.la \
184        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
185        $(OSIOBJDIR)/src/libOsi.la \
186        $(CLPOBJDIR)/src/libClp.la \
187        $(COINUTILSOBJDIR)/src/libCoinUtils.la
188
189# Finally, the -rpath flag is used by libtool to make sure that the shared
190# library is found (in the lib install directory) when we are using dynamic
191# libraries.
192solve_LDFLAGS = -rpath $(libdir)
193
194########################################################################
195#                            Additional flags                          #
196########################################################################
197
198# Here list all include flags, relative to this "srcdir" directory.  This
199# "cygpath" stuff is necessary to compile with native compilers on Windows.
200# "top_srcdir" refers to the basic directory for the main package that is
201# being compiled.
202CXXFLAGS += \
203        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
204        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglClique` \
205        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglFlowCover` \
206        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglGomory` \
207        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglKnapsackCover` \
208        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding` \
209        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglMixedIntegerRounding2` \
210        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglOddHole` \
211        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglPreProcess` \
212        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglProbing` \
213        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglRedSplit` \
214        -I`$(CYGPATH_W) $(CGLSRCDIR)/src/CglTwomir` \
215        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
216        -I`$(CYGPATH_W) $(OSISRCDIR)/src`
217
218# List additional defines
219DEFS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
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#     Generating the configure header that is to be distributed        #
247########################################################################
248
249CONFIG_DIST = CbcConfig.hpp
250CONFIG_H = config_cbc.h
251$(libCbc_la_OBJECTS) $(cbc_OBJECTS) $(solve_OBJECTS): ../inc/$(CONFIG_DIST)
252
253nodist_include_HEADERS = ../inc/$(CONFIG_DIST)
254
255../inc/$(CONFIG_DIST): ../inc/$(CONFIG_H)
256        echo "/** Required defines from $(CONFIG_H) */" >bla.tmp
257        echo "#ifndef __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
258        echo "#define __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
259        $(EGREP) 'COIN_|CBC_DEFAULT_SOLVER' $< >>bla.tmp
260        echo "#endif" >>bla.tmp
261        if test -r ../inc/$(CONFIG_DIST); then \
262          if diff ./inc/$(CONFIG_DIST) bla.tmp >/dev/null 2>1 ; then \
263            rm -f bla.tmp; \
264          else \
265            rm -f ../inc/$(CONFIG_DIST); \
266            mv bla.tmp ../inc/$(CONFIG_DIST); \
267          fi; \
268        else \
269          mv bla.tmp ../inc/$(CONFIG_DIST); \
270        fi
271
272CLEANFILES = bla.tmp
273
274DISTCLEANFILES = ../inc/$(CONFIG_DIST)
Note: See TracBrowser for help on using the repository browser.