-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
39 lines (28 loc) · 861 Bytes
/
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
# NOTE: PATH needs to include bin dir of typeart-mpicc wrapper
MPIRUN ?= mpirun
MPICC ?= typeart-mpicc # instead of standard mpicc
all: libtool.so 01_ex 02_ex toy toy-stack
libtool.so: tool.c
$(MPICC) -shared -fPIC $< -o $@
demo: 01_struct_example.c
$(MPICC) -O1 -g -c $< -o [email protected]
$(MPICC) [email protected] -o $@
demo_broken: 02_broken_struct_example.c
$(MPICC) -O1 -g -c $< -o [email protected]
$(MPICC) [email protected] -o $@
toy-stack: toy.c
$(MPICC) -O1 -g -c $< -o [email protected]
$(MPICC) [email protected] -o $@
toy: toy.c
$(MPICC) -DNOSTACK -O1 -g -c $< -o [email protected]
$(MPICC) [email protected] -o $@
runtoy: toy toy-stack
./toy
./toy-stack
run: run-demo run-demo_broken
run-demo: demo libtool.so
env LD_PRELOAD=./libtool.so $(MPIRUN) -np 1 demo
run-demo_broken: demo_broken libtool.so
env LD_PRELOAD=./libtool.so $(MPIRUN) -np 1 demo_broken
clean:
rm -f *.o libtool.so 01_ex 02_ex toy toy-stack types.yaml