| 1 |
URL="http://ab-initio.mit.edu/nlopt/nlopt-2.2.4.tar.gz" |
| 2 |
SRCDIR=nlopt-2.2.4 |
| 3 |
TARGZ=../pkg/$(SRCDIR).tar.gz |
| 4 |
-include Make.defs |
| 5 |
|
| 6 |
all: FAIRE |
| 7 |
|
| 8 |
FAIRE: ../pkg $(SRCDIR)/FAIT |
| 9 |
|
| 10 |
$(SRCDIR)/FAIT: $(TARGZ) |
| 11 |
tar zxf $(TARGZ) |
| 12 |
# |
| 13 |
# FFCS - 30/11/11 - "--disable-dependency-tracking": dependencies pose problem on mixed Cygwin/MinGW setups |
| 14 |
# because of slashes and backslashes |
| 15 |
# |
| 16 |
# FFCS - 22/10/12 - Fred - "--without-octave": patch for one machine that has octave installed on it: building of |
| 17 |
# nlopt fails because it wants to install the octave components. Not a bad idea in general but probably not when |
| 18 |
# building ffcs. |
| 19 |
# |
| 20 |
#remove c++11 flags for windfows FH .. |
| 21 |
cxxflags=`echo $(CXXFLAGS) |sed -e 's/[-]std=c[+][+]11//g'` ; \ |
| 22 |
cd $(SRCDIR) && ./configure --disable-dependency-tracking --with-cxx --prefix="$(FFDOWNLOAD)" CXX="$(CXX)" \ |
| 23 |
CXXFLAGS="$(CXXFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$$cxxflag" "--without-threadlocal" "--without-octave" |
| 24 |
# |
| 25 |
# FFCS - 30/11/11 - we need to know when the building process breaks |
| 26 |
# |
| 27 |
cd $(SRCDIR) && $(MAKE) install |
| 28 |
touch $(SRCDIR)/FAIT |
| 29 |
$(MAKE) WHERE |
| 30 |
../pkg: |
| 31 |
mkdir $@ |
| 32 |
|
| 33 |
$(TARGZ): |
| 34 |
../getall -o NLopt -a |
| 35 |
|
| 36 |
clean-local: |
| 37 |
rm -rf $(SRCDIR) Make.defs |
| 38 |
rm -f ../lib/libnlopt_cxx* ../lib/WHERE.nlopt |
| 39 |
rm -f ../include/nlopt* |
| 40 |
|
| 41 |
clean:clean-local |
| 42 |
|
| 43 |
WHERE: |
| 44 |
-if [ -f $(SRCDIR)/FAIT ] ; then \ |
| 45 |
echo nlopt LD -L@DIR@/lib -lnlopt_cxx >../lib/WHERE.nlopt ;\ |
| 46 |
echo nlopt INCLUDE -I@DIR@/include >> ../lib/WHERE.nlopt ;\ |
| 47 |
fi |
| 48 |
|
| 49 |
Make.defs: ../../config.status Makefile Make.inc |
| 50 |
../../config.status --file="Make.defs:Make.inc" |