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

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

added -rpath flag when building clp_solver

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 6.1 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 756 2006-05-11 17:27:37Z andreasw $
6
7# Author:  Andreas Waechter           IBM    2006-04-13
8
9AUTOMAKE_OPTIONS = foreign
10
11########################################################################
12#                               libClp                                 #
13########################################################################
14
15# Name of the library compiled in this directory.  We want it to be installed
16# in the 'lib' directory
17lib_LTLIBRARIES = libClp.la
18
19# List all source files for this library, including headers
20libClp_la_SOURCES = \
21        ClpCholeskyBase.cpp ClpCholeskyBase.hpp \
22        ClpCholeskyDense.cpp ClpCholeskyDense.hpp \
23        ClpCholeskyUfl.cpp ClpCholeskyUfl.hpp \
24        Clp_C_Interface.cpp Clp_C_Interface.h \
25        ClpDualRowDantzig.cpp ClpDualRowDantzig.hpp \
26        ClpDualRowPivot.cpp ClpDualRowPivot.hpp \
27        ClpDualRowSteepest.cpp ClpDualRowSteepest.hpp \
28        ClpDummyMatrix.cpp ClpDummyMatrix.hpp \
29        ClpDynamicExampleMatrix.cpp ClpDynamicExampleMatrix.hpp \
30        ClpDynamicMatrix.cpp ClpDynamicMatrix.hpp \
31        ClpEventHandler.cpp ClpEventHandler.hpp \
32        ClpFactorization.cpp ClpFactorization.hpp \
33        ClpGubDynamicMatrix.cpp ClpGubDynamicMatrix.hpp \
34        ClpGubMatrix.cpp ClpGubMatrix.hpp \
35        ClpHelperFunctions.cpp ClpHelperFunctions.hpp \
36        ClpInterior.cpp ClpInterior.hpp \
37        ClpLinearObjective.cpp ClpLinearObjective.hpp \
38        ClpMatrixBase.cpp ClpMatrixBase.hpp \
39        ClpMessage.cpp ClpMessage.hpp \
40        ClpModel.cpp ClpModel.hpp \
41        ClpNetworkBasis.cpp ClpNetworkBasis.hpp \
42        ClpNetworkMatrix.cpp ClpNetworkMatrix.hpp \
43        ClpNonLinearCost.cpp ClpNonLinearCost.hpp \
44        ClpObjective.cpp ClpObjective.hpp \
45        ClpPackedMatrix.cpp ClpPackedMatrix.hpp \
46        ClpParameters.hpp \
47        ClpPlusMinusOneMatrix.cpp ClpPlusMinusOneMatrix.hpp \
48        ClpPredictorCorrector.cpp ClpPredictorCorrector.hpp \
49        ClpPresolve.cpp ClpPresolve.hpp \
50        ClpPrimalColumnDantzig.cpp ClpPrimalColumnDantzig.hpp \
51        ClpPrimalColumnPivot.cpp ClpPrimalColumnPivot.hpp \
52        ClpPrimalColumnSteepest.cpp ClpPrimalColumnSteepest.hpp \
53        ClpQuadraticObjective.cpp ClpQuadraticObjective.hpp \
54        ClpSimplex.cpp ClpSimplex.hpp \
55        ClpSimplexDual.cpp ClpSimplexDual.hpp \
56        ClpSimplexNonlinear.cpp ClpSimplexNonlinear.hpp \
57        ClpSimplexOther.cpp ClpSimplexOther.hpp \
58        ClpSimplexPrimal.cpp ClpSimplexPrimal.hpp \
59        ClpSolve.cpp ClpSolve.hpp \
60        Idiot.cpp Idiot.hpp \
61        IdiSolve.cpp
62
63# This is for libtool (on Windows)
64libClp_la_LDFLAGS = -no-undefined
65
66########################################################################
67#                        clp_solver program                            #
68########################################################################
69
70# Name of the executable compiled in this directory.  We want it to be
71# installed in the 'bin' directory
72bin_PROGRAMS = clp_solver
73
74# List all source files for this executable, including headers
75clp_solver_SOURCES = \
76        ClpMain.cpp \
77        CbcOrClpParam.cpp CbcOrClpParam.hpp \
78        MyEventHandler.cpp MyEventHandler.hpp \
79        MyMessageHandler.cpp MyMessageHandler.hpp \
80        unitTest.cpp
81
82# List all additionally required COIN libraries
83clp_solver_LDADD = libClp.la \
84        $(COINBASEOBJDIR)/src/libCoinBase.la
85
86# And finally we add all missing libraries.  ADDLIBS is set by configure to
87# include all libraries that are determined to be necessary (such as -lgz).
88# We also need to list the additional libraries for the other COIN libraries
89# used.  Finally, the -rpath flag is used by libtool to make sure that
90# the shared library is found (in the lib install directory) when we are
91# using dynamic libraries.
92clp_solver_LDFLAGS = $(ADDLIBS) `cat $(COINBASEOBJDIR)/coinbase_addlibs.txt` \
93        -rpath $(libdir)
94
95########################################################################
96#                            Additional flags                          #
97########################################################################
98
99
100# Here list all include flags, relative to this "srcdir" directory.  This
101# "cygpath" stuff is necessary to compile with native compilers on Windows.
102# "top_srcdir" refers to the basic directory for the main package that is
103# being compiled.
104CXXFLAGS += \
105        -I`$(CYGPATH_W) $(COINBASESRCDIR)/src`
106
107########################################################################
108#                Headers that need to be installed                     #
109########################################################################
110
111# Here list all the header files that are required by a user of the library,
112# and that therefore should be installed in 'install'
113include_HEADERS = \
114        ClpDualRowDantzig.hpp \
115        ClpDualRowPivot.hpp \
116        ClpDualRowSteepest.hpp \
117        ClpEventHandler.hpp \
118        ClpFactorization.hpp \
119        ClpInterior.hpp \
120        ClpLinearObjective.hpp \
121        ClpMatrixBase.hpp \
122        ClpMessage.hpp \
123        ClpModel.hpp \
124        ClpNetworkMatrix.hpp \
125        ClpNonLinearCost.hpp \
126        ClpObjective.hpp \
127        ClpPackedMatrix.hpp \
128        ClpPlusMinusOneMatrix.hpp \
129        ClpParameters.hpp \
130        ClpPresolve.hpp \
131        ClpPrimalColumnDantzig.hpp \
132        ClpPrimalColumnPivot.hpp \
133        ClpPrimalColumnSteepest.hpp \
134        ClpSimplex.hpp \
135        ClpSimplexNonlinear.hpp \
136        ClpSimplexOther.hpp \
137        ClpSimplexPrimal.hpp \
138        ClpSolve.hpp \
139        Idiot.hpp
140
141########################################################################
142#     Generating the configure header that is to be distributed        #
143########################################################################
144
145# You should only need to adapt the following three lines
146CONFIG_DIST = ClpConfig.hpp
147CONFIG_H = config_clp.h
148$(libClp_la_OBJECTS): ../inc/$(CONFIG_DIST)
149
150nodist_include_HEADERS = ../inc/$(CONFIG_DIST)
151
152../inc/$(CONFIG_DIST): ../inc/$(CONFIG_H)
153        echo "/** Required defines from $(CONFIG_H) */" >bla.tmp
154        echo "#ifndef __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
155        echo "#define __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
156        $(EGREP) 'COIN_HAS' $< >>bla.tmp
157        echo "#endif" >>bla.tmp
158        if test -r ../inc/$(CONFIG_DIST); then \
159          if diff ./inc/$(CONFIG_DIST) bla.tmp >/dev/null 2>1 ; then \
160            rm -f bla.tmp; \
161          else \
162            rm -f ../inc/$(CONFIG_DIST); \
163            mv bla.tmp ../inc/$(CONFIG_DIST); \
164          fi; \
165        else \
166          mv bla.tmp ../inc/$(CONFIG_DIST); \
167        fi
168
169CLEANFILES = bla.tmp
170
171DISTCLEANFILES = ../inc/$(CONFIG_DIST)
Note: See TracBrowser for help on using the repository browser.