source: branches/devel/Bonmin/experimental/Bcp/Makefile.am @ 82

Last change on this file since 82 was 82, checked in by pbonami, 13 years ago

Rename some directories

  • Property svn:eol-style set to native
  • Property svn:keywords set to Authors Date Id Revision
File size: 3.8 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 82 2006-10-23 16:51:23Z pbonami $
6
7AUTOMAKE_OPTIONS = foreign
8
9# What is done in this directory:
10
11bin_PROGRAMS = bonminbcp
12
13########################################################################
14
15COINLIBS = \
16        $(BCPOBJDIR)/src/libBcp.la \
17        $(CBCOBJDIR)/src/libCbc.la \
18        $(CGLOBJDIR)/src/libCgl.la \
19        $(OSIOBJDIR)/src/OsiClp/libOsiClp.la \
20        $(OSIOBJDIR)/src/libOsi.la \
21        $(CLPOBJDIR)/src/libClp.la \
22        $(COINUTILSOBJDIR)/src/libCoinUtils.la
23
24if COIN_HAS_CPX
25  COINLIBS += \
26        $(OSIOBJDIR)/src/OsiCpx/libOsiCpx.la \
27        $(CPXLIB)
28endif
29
30IPOPTLIBS = \
31        $(IPOPTOBJDIR)/src/Interfaces/libipopt.la
32
33LIBS += `cat $(IPOPTOBJDIR)/src/Interfaces/ipopt_addlibs_cpp.txt`
34
35########################################################################
36#                                bonmin                                #
37########################################################################
38
39bonminbcp_SOURCES = BB_cut.hpp BB_cut.cpp BM.hpp BM.cpp BM_pack.cpp bm_var.hpp
40
41bonminbcp_DEPENDENCIES = amplsolver.a
42
43AMPL_PATHED_FILES = \
44        asl.h \
45        jac0dim.c \
46        misc.c \
47        pfg_read.c
48AMPL_SRC = $(abs_source_dir)/../ThirdParty/ASL/solvers
49
50amplsolver.a:
51        mkdir -p solvers ; \
52        cd solvers ; \
53        for f in $(AMPL_SRC)/*.c* $(AMPL_SRC)/*.h*; do \
54                $(LN_S) $$f ; \
55        done ; \
56        for f in $(AMPL_PATHED_FILES); do \
57                rm $$f ; \
58                cp $(AMPL_SRC)/$$f . ; \
59        done ; \
60        patch -p1 < $(abs_source_dir)/experimental/Bcp/ampl_bcp.patch ; \
61        for f in `grep -l 'strtod' *.c *.h`; do \
62                mv $$f $$f.orig ; \
63                sed -e 's/strtod/ASLstrtod/g' -e 's/ASLASLstrtod/ASLstrtod/g' $$f.orig > $$f ; \
64                rm $$f.orig ; \
65        done ; \
66        for f in `grep -l 'atof(' *.c`; do \
67                mv $$f $$f.orig ; \
68                sed -e 's/atof/ASLatof/g' -e 's/ASLASLatof/ASLatof/g' $$f.orig > $$f ; \
69                rm $$f.orig ; \
70        done ; \
71        sed -e 's/CFLAGS =/CFLAGS = -DNO_FUNCADD/g' $(AMPL_SRC)/makefile.u > makefile.u ; \
72        $(MAKE) -f makefile.u ; \
73        cp amplsolver.a ..
74
75bonminbcp_LDADD = \
76        ../../src/Apps/libbonmin.la \
77        ../../src/BonminAmplInterface/libamplinterface.la \
78        $(IPOPTOBJDIR)/src/Apps/AmplSolver/libamplinterface.la \
79        $(IPOPTLIBS) \
80        $(LIBCBCCOPY) \
81        $(COINLIBS) \
82        amplsolver.a \
83        $(ADDLIBS)
84
85# Finally, the -rpath flag is used by libtool to make sure that the shared
86# library is found (in the lib install directory) when we are using dynamic
87# libraries.
88bonminbcp_LDFLAGS = -rpath $(libdir)
89
90# Here list all include flags, relative to this "srcdir" directory.  This
91# "cygpath" stuff is necessary to compile with native compilers on Windows
92AM_CPPFLAGS = \
93        -I`$(CYGPATH_W) $(srcdir)/../../src/OaInterface` \
94        -I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
95        -I`$(CYGPATH_W) $(srcdir)/../../src/BonminAmplInterface` \
96        -I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` \
97        -I`$(CYGPATH_W) $(IPOPTOBJDIR)/inc` \
98        -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Common` \
99        -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Interfaces` \
100        -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/LinAlg` \
101        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
102        -I`$(CYGPATH_W) $(COINUTILSOBJDIR)/inc` \
103        -I`$(CYGPATH_W) $(CBCSRCDIR)/src` \
104        -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
105        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc` \
106        -I`$(CYGPATH_W) $(OSISRCDIR)/src` \
107        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
108        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
109        -I`$(CYGPATH_W) $(BCPSRCDIR)/src/include`
110
111if COIN_HAS_CPX
112  AM_CPPFLAGS += \
113        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
114        -I`$(CYGPATH_W) $(CPXINCDIR)`
115endif
116
117# This line is necessary to allow VPATH compilation with MS compilers
118# on Cygwin
119DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
120
121########################################################################
122#                         make distclean stuff                         #
123########################################################################
124
125CLEANFILES = $(LIBCBCCOPY)
126
127DISTCLEANFILES =
Note: See TracBrowser for help on using the repository browser.