Statistics
| Revision:

root / Pi / C / OpenACC / Makefile @ 183

History | View | Annotate | Download (737 Bytes)

1 183 equemene
# Compile all version of Pi_OpenACC using Nvidia GPU
2 183 equemene
# Cecill v2 Emmanuel QUEMENER <emmanuel.quemener@gmail.com>
3 183 equemene
4 183 equemene
SOURCE=Pi_OpenACC.c
5 183 equemene
6 183 equemene
COMPUTING=INT32 INT64 FP32 FP64
7 183 equemene
MARSAGLIA=SHR3 CONG MWC KISS
8 183 equemene
9 183 equemene
CC=pgcc
10 183 equemene
CFLAGS=-O3
11 183 equemene
LIBRARY=
12 183 equemene
ACCFLAGS=-acc -ta=tesla:cc70 -Minfo=accel
13 183 equemene
14 183 equemene
all: $(SOURCE)
15 183 equemene
16 183 equemene
	$(foreach TVAR,$(COMPUTING),$(foreach TRND,$(MARSAGLIA),$(CC) $(CFLAGS) $(ACCFLAGS) -DT$(TVAR) -DT$(TRND) -DLONG -DTIME -o $(<:.c=)_$(TVAR)_$(TRND) $< $(LIBRARY); ) )
17 183 equemene
18 183 equemene
.PHONY: clean check mrproper
19 183 equemene
20 183 equemene
mrproper:
21 183 equemene
	rm -rf $(foreach SRC,$(SOURCE),$(foreach TVAR,$(COMPUTING),$(foreach TRND,$(MARSAGLIA),$(SRC:.c=)_$(TVAR)_$(TRND) ) ) )
22 183 equemene
	find . -name "*~" -exec rm {} \;
23 183 equemene
24 183 equemene
clean:
25 183 equemene
	find . -name "*~" -exec rm {} \;
26 183 equemene
27 183 equemene
check: $(EXECUTABLE)
28 183 equemene
29 183 equemene
	@echo "To be Defined"