Debian Codegraph @

3rdparty/ipopt/Makefile

raw
1 # Downloading and compiling extra libraries
2 # -----------------------------------------
3
4 include Makefile.inc
5
6 all-local: Ipopt
7
8 MAKEFLAGS += -j1
9
10 # Downloading and compiling mumps
11 # ------------------------------
12
13 DIR=$(DOWNLOADFF)/ipopt
14 DIRPKG=../pkg
15 SRCDIR=Ipopt-$(VERSION)
16 PACKAGE=$(DIRPKG)/Ipopt-$(VERSION).tgz
17 INSTALL=../..
18 VERSION=3.12.4
19 # 3.10.2
20 URL=http://www.coin-or.org/download/source/Ipopt
21 FHSL=#$(DIRPKG)/ddeps.f $(DIRPKG)/ma27ad.f $(DIRPKG)/mc19d.f
22 WHERE_MUMPSSEQ=$(wildcard ../lib/WHERE.mumpsseq)
23
24 ifeq ($(WHERE_MUMPSSEQ),)
25 LIBMUMPS=-ldmumps_seq -lzmumps_seq -lmumps_common_seq -lpord_seq -lmpiseq_seq
26 INCMUMPS=/usr/include/mumps_seq
27 else
28 LIBMUMPS=-L$(DOWNLOADFF)/lib -ldmumpsFREEFEM-SEQ -lzmumpsFREEFEM-SEQ -lmumps_commonFREEFEM-SEQ -lpordFREEFEM-SEQ -lmpiseqFREEFEM-SEQ
29 INCMUMPS=$(DOWNLOADFF)/include/mumps_seq
30 endif
31
32 #/Ipopt-3.10.2.tgz
33 Ipopt: $(SRCDIR)/FAIRE
34 # --enable-static --disable-shared
35
36 # ALH - 6/1/14 - We need to specify FLIBS explicitely because Ipopt
37 # fails to guess FLIBS correctly on Windows+Cygwin+Mingw64, see [[file:Makefile.inc.in::FLIBS]]
38
39 $(SRCDIR)/FAIT: $(SRCDIR)/tag-tar
40 # FFCS - disable dependency tracking like in FFCS itself for MinGW compilation (problem with backslashes, see
41 # [[file:../../../../configure.ac::enable_dependency_tracking]])
42 cd $(SRCDIR) ; \
43 ./configure --disable-dependency-tracking \
44 --disable-shared --enable-static \
45 --with-mumps='$(LIBMUMPS)' \
46 --without-hsl \
47 --with-mumps-incdir='$(INCMUMPS)' \
48 CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS) -I$(INCMUMPS)' \
49 CC='$(CC)' CFLAGS='$(CFLAGS) -I$(INCMUMPS)' \
50 F77='$(FC)' FFLAGS='$(FCFLAGS)' \
51 FLIBS='$(FLIBS)' \
52 CXXCPP='' CPP='' MPICC='' MPICXX='' MPIFC='' \
53 --with-blas-lib='$(LIBBLAS)' --with-lapack='$(LIBLAPACK)' --prefix='$(DOWNLOADFF)'
54 -rm -rf ../include/coin
55 touch $(SRCDIR)/FAIT
56
57 # FFCS - avoid remaking install every time
58 install.done: Makefile $(SRCDIR)/FAIT
59 $(MAKE) -C $(SRCDIR) install
60 touch $@
61 clean-local::
62 -rm *.done
63
64 # FFCS - install and WHERE need to be sequential
65 WHERE.done: install.done Makefile
66 echo ipopt LD -L@DIR@/lib -lipopt >$(SRCDIR)/$(INSTALL)/lib/WHERE.Ipopt;
67 echo ipopt INCLUDE -I@DIR@/include >> $(SRCDIR)/$(INSTALL)/lib/WHERE.Ipopt ;
68 touch $@
69
70 Makefile.inc:
71 ../../config.status --file="Makefile.inc:Makefile.inc.in"
72
73 # FFCS - install and WHERE need to be sequential
74 $(SRCDIR)/FAIRE: install.done WHERE.done
75 touch $@
76
77
78 $(SRCDIR)/$(INSTALL): $(SRCDIR)/tag-tar
79
80 $(SRCDIR)/tag-tar:$(PACKAGE) $(FHSL)
81 tar xzf $(PACKAGE)
82 # patch -p0 <patch-IpBlas
83 touch $(SRCDIR)/tag-tar
84
85 $(PACKAGE):
86 ../getall -o Ipopt -a
87
88 clean-local::
89 rm -rf $(SRCDIR) *~ Makefile.inc
90
91 clean: clean-local
92 -rm -rf ../include/coin
93 -rm ../lib/libipopt* ../lib/liblcoinhsl*
94 #FH -rm $(PACKAGE)
95
96 .PHONY:$(SRCDIR)/$(INSTALL)
97 #.NOTPARALLEL:$(SRCDIR)/$(INSTALL)