-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 711 Bytes
/
Makefile
File metadata and controls
37 lines (30 loc) · 711 Bytes
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
COMPILER1 = gcc
COMPILER2 = /usr/local/cuda-5.5/bin/nvcc
OBJS1 = src/ising.c
OBJS2 = src/ising3d.c
OBJS3 = src/ising2d.cu
LIB = -lm
CUDAFLAG = -arch=sm_20
CFLAG += -Wall
C9FLAG = -std=c99
ifdef gflag
CFLAG += -g
endif
ifdef picture
CFLAG += -DPICORE=1
endif
default: clean ising ising3d
all: clean ising ising3d cuda
ising: ${OBJS}
${COMPILER1} ${CFLAG} ${C9FLAG} $(LIB) ${OBJS1} -O3 -o src/ising.o
ising3d: ${OBJS}
${COMPILER1} ${CFLAG} ${C9FLAG} $(LIB) ${OBJS2} -O3 -o src/ising3d.o
cuda: ${OBJS}
${COMPILER2} ${CFLAG} ${CUDAFLAG} $(LIB) ${OBJS3} -O3 -o src/ising2d.o
clean:
-rm -f src/*.o
cleandata: clean2ddata clean3ddata
clean2ddata:
-rm -f data/2d/*.dat
clean3ddata:
-rm -f data/3d/*.dat