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

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

Fix some strange compilation problems

  • Property svn:eol-style set to native
  • Property svn:keywords set to Authors Date Id Revision
File size: 4.3 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 124 2006-11-21 17:27:52Z 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`
34LIBS += `cat $(COINUTILSOBJDIR)/coinutils_addlibs.txt`
35
36########################################################################
37#                                bonminbcp                                #
38########################################################################
39
40bonminbcp_SOURCES = BB_cut.hpp BM.hpp \
41        BB_cut.cpp BM.cpp BM_tm.cpp BM_lp.cpp BM_lp_branch.cpp BM_pack.cpp
42
43bonminbcp_DEPENDENCIES = amplsolver.a
44
45AMPL_PATHED_FILES = \
46        asl.h \
47        jac0dim.c \
48        misc.c \
49        pfg_read.c
50AMPL_SRC = $(abs_source_dir)/../ThirdParty/ASL/solvers
51
52amplsolver.a:
53        rm -rf solvers
54        mkdir -p solvers ; \
55        cd solvers ; \
56        for f in $(AMPL_SRC)/*.c* $(AMPL_SRC)/*.h* $(AMPL_SRC)/makefile.u; do \
57                $(LN_S) $$f ; \
58        done ; \
59        for f in $(AMPL_PATHED_FILES); do \
60                rm $$f ; \
61                cp $(AMPL_SRC)/$$f . ; \
62        done ; \
63        patch -p1 < $(abs_source_dir)/experimental/Bcp/ampl_bcp.patch ; \
64        for f in `grep -l 'strtod' *.c *.h`; do \
65                mv $$f $$f.orig ; \
66                sed -e 's/strtod/ASLstrtod/g' -e 's/ASLASLstrtod/ASLstrtod/g' $$f.orig > $$f ; \
67                rm $$f.orig ; \
68        done ; \
69        for f in `grep -l 'atof(' *.c`; do \
70                mv $$f $$f.orig ; \
71                sed -e 's/atof/ASLatof/g' -e 's/ASLASLatof/ASLatof/g' $$f.orig > $$f ; \
72                rm $$f.orig ; \
73        done ; \
74        rm -f aslflags.txt ; \
75        grep ASLMAKEFLAGS ../../../../ThirdParty/ASL/config.log | tail -1 > aslflags.txt ; \
76        cat aslflags.txt ; \
77        eval `sed -e "s/ CFLAGS=\".*\"//" aslflags.txt`; \
78        eval `sed -e "s/.*CFLAGS=\"\(.*\)\".*/CFLAGS=\"-DNO_FUNCADD \1\"/" aslflags.txt` ; \
79        if test x"$$CC" = x; then \
80                CC=cc ; \
81        fi; \
82        $(MAKE) CC="$$CC" $$ASLMAKEFLAGS CFLAGS="$$CFLAGS" -f makefile.u ; \
83        cp amplsolver.a ..
84
85bonminbcp_LDADD = \
86        ../../src/Apps/libbonmin.la \
87        ../../src/Interfaces/Ampl/libamplinterface.la \
88        $(IPOPTOBJDIR)/src/Apps/AmplSolver/libamplinterface.la \
89        $(IPOPTLIBS) \
90        $(LIBCBCCOPY) \
91        $(COINLIBS) \
92        amplsolver.a \
93        $(ADDLIBS)
94
95# Finally, the -rpath flag is used by libtool to make sure that the shared
96# library is found (in the lib install directory) when we are using dynamic
97# libraries.
98bonminbcp_LDFLAGS = -rpath $(libdir)
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
102AM_CPPFLAGS = \
103        -I`$(CYGPATH_W) $(srcdir)/../../src/OaAlgorithms` \
104        -I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces` \
105        -I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ipopt` \
106        -I`$(CYGPATH_W) $(srcdir)/../../src/Interfaces/Ampl` \
107        -I`$(CYGPATH_W) $(srcdir)/../../src/CbcBonmin` \
108        -I`$(CYGPATH_W) $(IPOPTOBJDIR)/inc` \
109        -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Common` \
110        -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/Interfaces` \
111        -I`$(CYGPATH_W) $(IPOPTSRCDIR)/src/LinAlg` \
112        -I`$(CYGPATH_W) $(COINUTILSSRCDIR)/src` \
113        -I`$(CYGPATH_W) $(COINUTILSOBJDIR)/inc` \
114        -I`$(CYGPATH_W) $(CBCSRCDIR)/src` \
115        -I`$(CYGPATH_W) $(CLPSRCDIR)/src` \
116        -I`$(CYGPATH_W) $(CLPOBJDIR)/inc` \
117        -I`$(CYGPATH_W) $(OSISRCDIR)/src` \
118        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiClp` \
119        -I`$(CYGPATH_W) $(CGLSRCDIR)/src` \
120        -I`$(CYGPATH_W) $(BCPSRCDIR)/src/include`
121
122if COIN_HAS_CPX
123  AM_CPPFLAGS += \
124        -I`$(CYGPATH_W) $(OSISRCDIR)/src/OsiCpx` \
125        -I`$(CYGPATH_W) $(CPXINCDIR)`
126endif
127
128# This line is necessary to allow VPATH compilation with MS compilers
129# on Cygwin
130DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
131
132########################################################################
133#                         make distclean stuff                         #
134########################################################################
135
136CLEANFILES = $(LIBCBCCOPY) amplsolver.a
137
138DISTCLEANFILES =
Note: See TracBrowser for help on using the repository browser.