-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (36 loc) · 1.21 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
NOELLE_DIR ?= compiler/noelle
BUILD_DIR=.build.dir
HOOKS_DIR=.githooks
MEMOIR_INSTALL_DIR ?= $(shell realpath install)
NORM_RUNTIME=$(MEMOIR_INSTALL_DIR)/bin/memoir-norm-runtime
RUNTIME_BC=$(MEMOIR_INSTALL_DIR)/lib/memoir.impl.bc
DECL_BC=$(MEMOIR_INSTALL_DIR)/lib/memoir.decl.bc
all: hooks postinstall
build:
mkdir -p $(BUILD_DIR)
mkdir -p $(MEMOIR_INSTALL_DIR)
cmake -DCMAKE_INSTALL_PREFIX=$(MEMOIR_INSTALL_DIR) -DCMAKE_C_COMPILER=`which clang` -DCMAKE_CXX_COMPILER=`which clang++` -S . -B $(BUILD_DIR)
make -C $(BUILD_DIR) all -j32 --no-print-directory
install: build
make -C $(BUILD_DIR) install -j32 --no-print-directory
postinstall: install
$(NORM_RUNTIME) $(RUNTIME_BC) $(DECL_BC)
@cp $(BUILD_DIR)/compile_commands.json .
benchmark: all
make -C $(BUILD_DIR) bitcodes -j32
test:
make -C tests/unit
documentation: all
make -C $(BUILD_DIR)/docs documentation -j32
hooks:
make -C $(HOOKS_DIR) all --no-print-directory
uninstall:
-cat $(BUILD_DIR)/install_manifest.txt | xargs rm -f
rm -f enable
rm -rf $(BUILD_DIR)
fulluninstall: uninstall
clean:
make -C $(BUILD_DIR) clean -j32
make -C $(HOOKS_DIR) clean
rm -rf $(BUILD_DIR)
.PHONY: all noelle build install postinstall uninstall fulluninstall clean test