source: trunk/Clp/src/Makefile.am @ 1691

Last change on this file since 1691 was 1691, checked in by stefan, 9 years ago

check for AMD and CHOLMOD and GLPK's AMD in configure; compile ClpCholeskyUfl? only if AMD, CHOLMOD, or GLPK available

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.8 KB
Line 
1# Copyright (C) 2006 International Business Machines and others.
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5## $Id: Makefile.am 1691 2011-03-05 17:06:15Z stefan $
6
7# Author:  Andreas Waechter           IBM    2006-04-13
8
9AUTOMAKE_OPTIONS = foreign
10
11if COIN_HAS_OSI
12  SUBDIRS = OsiClp
13endif
14
15########################################################################
16#                               libClp                                 #
17########################################################################
18
19# Name of the library compiled in this directory.  We want it to be installed
20# in the 'lib' directory
21lib_LTLIBRARIES = libClp.la
22
23# List all source files for this library, including headers
24libClp_la_SOURCES = \
25        ClpConfig.h \
26        ClpCholeskyBase.cpp ClpCholeskyBase.hpp \
27        ClpCholeskyDense.cpp ClpCholeskyDense.hpp \
28        ClpCholeskyMumps.cpp ClpCholeskyMumps.hpp \
29        ClpCholeskyWssmp.cpp ClpCholeskyWssmp.hpp \
30        ClpCholeskyWssmpKKT.cpp ClpCholeskyWssmpKKT.hpp \
31        ClpConstraint.cpp ClpConstraint.hpp \
32        ClpConstraintLinear.cpp ClpConstraintLinear.hpp \
33        ClpConstraintQuadratic.cpp ClpConstraintQuadratic.hpp \
34        Clp_C_Interface.cpp Clp_C_Interface.h \
35        ClpDualRowDantzig.cpp ClpDualRowDantzig.hpp \
36        ClpDualRowPivot.cpp ClpDualRowPivot.hpp \
37        ClpDualRowSteepest.cpp ClpDualRowSteepest.hpp \
38        ClpDummyMatrix.cpp ClpDummyMatrix.hpp \
39        ClpDynamicExampleMatrix.cpp ClpDynamicExampleMatrix.hpp \
40        ClpDynamicMatrix.cpp ClpDynamicMatrix.hpp \
41        ClpEventHandler.cpp ClpEventHandler.hpp \
42        ClpFactorization.cpp ClpFactorization.hpp \
43        ClpGubDynamicMatrix.cpp ClpGubDynamicMatrix.hpp \
44        ClpGubMatrix.cpp ClpGubMatrix.hpp \
45        ClpHelperFunctions.cpp ClpHelperFunctions.hpp \
46        ClpInterior.cpp ClpInterior.hpp \
47        ClpLinearObjective.cpp ClpLinearObjective.hpp \
48        ClpMatrixBase.cpp ClpMatrixBase.hpp \
49        ClpMessage.cpp ClpMessage.hpp \
50        ClpModel.cpp ClpModel.hpp \
51        ClpNetworkBasis.cpp ClpNetworkBasis.hpp \
52        ClpNetworkMatrix.cpp ClpNetworkMatrix.hpp \
53        ClpNonLinearCost.cpp ClpNonLinearCost.hpp \
54        ClpNode.cpp ClpNode.hpp \
55        ClpObjective.cpp ClpObjective.hpp \
56        ClpPackedMatrix.cpp ClpPackedMatrix.hpp \
57        ClpParameters.hpp \
58        ClpPlusMinusOneMatrix.cpp ClpPlusMinusOneMatrix.hpp \
59        ClpPredictorCorrector.cpp ClpPredictorCorrector.hpp \
60        ClpPdco.cpp ClpPdco.hpp \
61        ClpPdcoBase.cpp ClpPdcoBase.hpp \
62        ClpLsqr.cpp ClpLsqr.hpp \
63        ClpPresolve.cpp ClpPresolve.hpp \
64        ClpPrimalColumnDantzig.cpp ClpPrimalColumnDantzig.hpp \
65        ClpPrimalColumnPivot.cpp ClpPrimalColumnPivot.hpp \
66        ClpPrimalColumnSteepest.cpp ClpPrimalColumnSteepest.hpp \
67        ClpQuadraticObjective.cpp ClpQuadraticObjective.hpp \
68        ClpSimplex.cpp ClpSimplex.hpp \
69        ClpSimplexDual.cpp ClpSimplexDual.hpp \
70        ClpSimplexNonlinear.cpp ClpSimplexNonlinear.hpp \
71        ClpSimplexOther.cpp ClpSimplexOther.hpp \
72        ClpSimplexPrimal.cpp ClpSimplexPrimal.hpp \
73        ClpSolve.cpp ClpSolve.hpp \
74        Idiot.cpp Idiot.hpp \
75        IdiSolve.cpp
76
77# if AMD, CHOLMOD, or GLPK is available, then compile ClpCholeskyUfl.cpp
78if COIN_HAS_AMD
79libClp_la_SOURCES += ClpCholeskyUfl.cpp ClpCholeskyUfl.hpp
80else
81if COIN_HAS_CHOLMOD
82libClp_la_SOURCES += ClpCholeskyUfl.cpp ClpCholeskyUfl.hpp
83else
84if COIN_HAS_GLPK
85libClp_la_SOURCES += ClpCholeskyUfl.cpp ClpCholeskyUfl.hpp
86endif
87endif
88endif
89
90# This is for libtool
91libClp_la_LDFLAGS = $(LT_LDFLAGS)
92
93########################################################################
94#                            clp program                               #
95########################################################################
96
97# Name of the executable compiled in this directory.  We want it to be
98# installed in the 'bin' directory
99bin_PROGRAMS = clp
100
101# List all source files for this executable, including headers
102clp_SOURCES = \
103        ClpMain.cpp \
104        CbcOrClpParam.cpp CbcOrClpParam.hpp \
105        MyEventHandler.cpp MyEventHandler.hpp \
106        MyMessageHandler.cpp MyMessageHandler.hpp \
107        unitTest.cpp
108
109# List all additionally required libraries
110clp_LDADD = libClp.la $(CLPLIB_LIBS)
111
112# List all dependency libraries (similar to LDADD, but without -l, -L flags)
113clp_DEPENDENCIES = libClp.la $(CLPLIB_DEPENDENCIES)
114
115# Finally, the -rpath flag is used by libtool to make sure that the shared
116# library is found (in the lib install directory) when we are using dynamic
117# libraries.
118clp_LDFLAGS = -rpath $(libdir)
119
120########################################################################
121#                            Additional flags                          #
122########################################################################
123
124# CbcOrClpParam seem to require COIN_HAS_CLP so that it knows that it is build within Clp
125AM_CPPFLAGS = $(CLPLIB_CFLAGS) -DCOIN_HAS_CLP
126
127if COIN_HAS_CHOLMOD
128AM_CPPFLAGS += -I`$(CYGPATH_W) $(CHOLMODINCDIR)`
129endif
130
131if COIN_HAS_AMD
132AM_CPPFLAGS += -I`$(CYGPATH_W) $(AMDINCDIR)`
133endif
134
135# This line is necessary to allow VPATH compilation with MS compilers
136# on Cygwin
137DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
138
139########################################################################
140#                Headers that need to be installed                     #
141########################################################################
142
143# Here list all the header files that are required by a user of the library,
144# and that therefore should be installed in 'include/coin'
145includecoindir = $(includedir)/coin
146includecoin_HEADERS = \
147        ../inc/config_clp.h \
148        Clp_C_Interface.h \
149        ClpCholeskyBase.hpp \
150        ClpCholeskyDense.hpp \
151        ClpCholeskyWssmp.hpp \
152        ClpConstraint.hpp \
153        ClpConstraintLinear.hpp \
154        ClpConstraintQuadratic.hpp \
155        ClpDualRowDantzig.hpp \
156        ClpDualRowPivot.hpp \
157        ClpDualRowSteepest.hpp \
158        ClpDummyMatrix.hpp \
159        ClpDynamicExampleMatrix.hpp \
160        ClpDynamicMatrix.hpp \
161        ClpEventHandler.hpp \
162        ClpFactorization.hpp \
163        ClpGubDynamicMatrix.hpp \
164        ClpGubMatrix.hpp \
165        ClpInterior.hpp \
166        ClpLinearObjective.hpp \
167        ClpMatrixBase.hpp \
168        ClpMessage.hpp \
169        ClpModel.hpp \
170        ClpNetworkMatrix.hpp \
171        ClpNonLinearCost.hpp \
172        ClpNode.hpp \
173        ClpObjective.hpp \
174        ClpPackedMatrix.hpp \
175        ClpPdcoBase.hpp \
176        ClpPlusMinusOneMatrix.hpp \
177        ClpParameters.hpp \
178        ClpPresolve.hpp \
179        ClpPrimalColumnDantzig.hpp \
180        ClpPrimalColumnPivot.hpp \
181        ClpPrimalColumnSteepest.hpp \
182        ClpQuadraticObjective.hpp \
183        ClpSimplex.hpp \
184        ClpSimplexNonlinear.hpp \
185        ClpSimplexOther.hpp \
186        ClpSimplexPrimal.hpp \
187        ClpSolve.hpp \
188        CbcOrClpParam.hpp \
189        Idiot.hpp
190
191# needed by Cbc
192includecoin_HEADERS += CbcOrClpParam.cpp
193
194#############################################################################
195# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
196#############################################################################
197
198# You only need to adapt the following line
199ConfigHeader = ClpConfig.h
200
201install-exec-local:
202        echo "#ifndef HAVE_CONFIG_H" >bla
203        echo "#define HAVE_CONFIG_H" >>bla
204        echo "#endif" >> bla
205        cat $(srcdir)/$(ConfigHeader) >> bla
206        $(install_sh_DATA) bla $(DESTDIR)$(includecoindir)/$(ConfigHeader)
207        rm -f bla
208
209uninstall-local:
210        rm -f $(DESTDIR)$(includecoindir)/$(ConfigHeader)
Note: See TracBrowser for help on using the repository browser.