-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathMakefile
54 lines (36 loc) · 826 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# To build with a different compiler / on a different platform, use
# make PLATFORM=xxx
#
# where xxx is
# icc = Intel compilers
# gcc = GNU compilers
# clang = Clang compiler (OS X default)
#
# Or create a Makefile.in.xxx of your own!
#
PLATFORM=icc
include Makefile.in.$(PLATFORM)
.PHONY: exe clean realclean
# === Executables
exe: path.x
path.x: path.o mt19937p.o
$(CC) $(OMP_CFLAGS) $^ -o $@
path.o: path.c
$(CC) -c $(OMP_CFLAGS) $<
path-mpi.x: path-mpi.o mt19937p.o
$(MPICC) $(MPI_CFLAGS) $^ -o $@
path-mpi.o: path-mpi.c
$(MPICC) -c $(MPI_CFLAGS) $<
%.o: %.c
$(CC) -c $(CFLAGS) $<
# === Documentation
main.pdf: README.md path.md
pandoc $^ -o $@
path.md: path.c
ldoc -o $@ $^
# === Cleanup and tarball
clean:
rm -f *.o
realclean: clean
rm -f path.x path-mpi.x path.md main.pdf