This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.mk
48 lines (37 loc) · 1.42 KB
/
config.mk
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
# Build directories of the HDFIT OpenBLAS and LLTFI distributions - do not add line breaks!
OPENBLAS_ROOT = PATH_TO_OPENBLAS_INSTALLATION
LLTFI_ROOT = PATH_TO_LLTFI_INSTALLATION
# MPI compilers plus other settings
MPICC = mpicc
MPICXX = mpicxx
CC = clang
CXX = clang++
MAKE_JOBS = 8
# --------- DO NOT EDIT PAST THIS POINT ---------
LLTFI_LINKER = -L$(LLTFI_ROOT)/runtime_lib/ -lllfi-rt
LLTFI_PLUGIN = -Xclang -fpass-plugin=$(LLTFI_ROOT)/llvm_passes/llfi-passes.so -Xclang -load -Xclang $(LLTFI_ROOT)/llvm_passes/llfi-passes.so
LLTFI_SETTINGS = $(LLTFI_PLUGIN) -mllvm -insttype -mllvm -includeinst=fadd -mllvm -includeinst=fmul -mllvm \
-includeinst=fsub -mllvm -includeinst=fdiv -mllvm -regloc -mllvm -dstreg
hdfit_PATCH = 0001-Integrating-HDFIT.patch
SHELL = /bin/bash
.PRECIOUS: %/.cloned %/.downloaded %/.touched %/.patched %/.compiled
%/.cloned:
@echo "Cloning $(@D)..."
git clone $($(@D)_REPO)
chmod -R u=rwX,go=rX $(@D)
@touch $(@D)/.cloned
%/.downloaded:
@echo "Downloading $(@D)..."
mkdir -p $(@D)
cd $(@D) && wget $($(@D)_TARBALL)
cd $(@D) && tar -zxvf $(shell basename $($(@D)_TARBALL))
chmod -R u=rwX,go=rX $(@D)
@touch $(@D)/.downloaded
%/.touched: %/.cloned
@echo "Copying data dependencies for $(@D)..."
cp -r resources/$(@D)/inputs/* $(@D)/ || :
@touch $(@D)/.touched
%/.patched: %/.touched
@echo "Patching $(@D)..."
cd $(@D) && git am ../resources/$(@D)/$(hdfit_PATCH)
@touch $(@D)/.patched