-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile-external
57 lines (50 loc) · 1.95 KB
/
Makefile-external
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
INSTALL_DIR=$(CURDIR)/external-install
SOURCE_DIR=$(CURDIR)/external-src
NUM_BUILD_THREADS=4
all: pybind11 lemon clp
rm -rf $(SOURCE_DIR)
clean:
rm -rf $(INSTALL_DIR)
rm -rf $(SOURCE_DIR)
lemon: mkdirs
rm -rf $(SOURCE_DIR)/lemon && mkdir -p $(SOURCE_DIR)/lemon
wget http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz \
-O $(SOURCE_DIR)/lemon/lemon-1.3.1.tar.gz
cd $(SOURCE_DIR)/lemon && tar xfz lemon-1.3.1.tar.gz
mkdir $(SOURCE_DIR)/lemon/lemon-1.3.1/build
cd $(SOURCE_DIR)/lemon/lemon-1.3.1/build && cmake \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) \
..
cd $(SOURCE_DIR)/lemon/lemon-1.3.1/build && make -j$(NUM_BUILD_THREADS)
cd $(SOURCE_DIR)/lemon/lemon-1.3.1/build && make install
rm -rf $(SOURCE_DIR)/lemon
clp: mkdirs
rm -rf $(SOURCE_DIR)/clp && mkdir -p $(SOURCE_DIR)/clp
cd $(SOURCE_DIR)/clp && svn co \
https://projects.coin-or.org/svn/Clp/stable/1.16 \
--trust-server-cert-failures 'unknown-ca' \
--non-interactive
cd $(SOURCE_DIR)/clp/1.16 && ./configure \
-C --prefix=$(INSTALL_DIR) --with-pic --without-datanet-lib \
--without-sample-lib --enable-static --disable-shared
cd $(SOURCE_DIR)/clp/1.16 && make -j$(NUM_BUILD_THREADS)
cd $(SOURCE_DIR)/clp/1.16 && make install
rm -rf $(SOURCE_DIR)/clp
pybind11: mkdirs
rm -rf $(SOURCE_DIR)/pybind11 && mkdir -p $(SOURCE_DIR)/pybind11
wget https://github.com/pybind/pybind11/archive/v2.0.0.tar.gz \
-O $(SOURCE_DIR)/pybind11/v2.0.0.tar.gz
cd $(SOURCE_DIR)/pybind11 && tar xfz v2.0.0.tar.gz
mkdir $(SOURCE_DIR)/pybind11/pybind11-2.0.0/build
cd $(SOURCE_DIR)/pybind11/pybind11-2.0.0/build && cmake \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) \
-DPYBIND11_CPP_STANDARD=-std=c++14 \
-DPYBIND11_TEST=OFF \
..
cd $(SOURCE_DIR)/pybind11/pybind11-2.0.0/build && make -j$(NUM_BUILD_THREADS)
cd $(SOURCE_DIR)/pybind11/pybind11-2.0.0/build && make install
rm -rf $(SOURCE_DIR)/pybind11
mkdirs:
mkdir -p $(INSTALL_DIR) $(SOURCE_DIR)