forked from securesystemslab/multicompiler-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
83 lines (54 loc) · 1.84 KB
/
makefile
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# makefile for multi-compiler project
#SHELL=/bin/bash
.PHONY: clean fetch ppf
#llvm-cmake hypervisor-setup
PREFIX=$(realpath tools)
all:
#echo "Prefix = $(value PREFIX)"
#download src
##############################
fetch: llvm llvm/tools/clang llvm/projects/compiler-rt llvm/projects/svf llvm/projects/poolalloc binutils
llvm:
git clone -b cfar_38 [email protected]:/securesystemslab/multicompiler-priv.git llvm
llvm/tools/clang: llvm
git clone -b cfar_38 [email protected]:/securesystemslab/multicompiler-clang-priv.git llvm/tools/clang
llvm/projects/compiler-rt: llvm
git clone -b cfar_38 [email protected]:/securesystemslab/multicompiler-compiler-rt-priv.git llvm/projects/compiler-rt
llvm/projects/svf: llvm
git clone [email protected]:/rboggild/SVF llvm/projects/svf
llvm/projects/poolalloc: llvm
git clone -b cfar_38 [email protected]:/securesystemslab/poolalloc-priv.git llvm/projects/poolalloc
binutils:
git clone -b random_commons-2_26 [email protected]:/securesystemslab/binutils.git
##############################
install: ppf gold.install clang.install outdir
ppf:
./patch_printf.bash
gold.install: gold.build
$(MAKE) -C binutils install
clang.install: tools/bin/clang tools/bin/ld.old tools/lib/bfd-plugins
outdir: clang.install
sudo mv tools/* /multicompiler
tools/bin/ld.old: gold.install
mv tools/bin/ld tools/bin/ld.old; \
ln -sf ld.gold tools/bin/ld
gold.build: gold.config
echo $(value PREFIX)
$(MAKE) -j -C binutils
gold.config: binutils/.binutils_configured
binutils/.binutils_configured:
./configure_binutils.sh $(PREFIX)
llvm/build: ppf
./setup_llvm.sh $(PREFIX)
tools/lib/bfd-plugins: tools/bin/clang gold.install
./create_bfd_plugins.sh
tools/bin/clang: llvm/build
./build_clang.sh
#clang: tools/lib/bfd-plugins
clean: clean_install
rm -rf llvm
rm -rf binutils
clean_llvm:
rm -rf llvm/build
clean_install:
rm -rf tools/*