Statistics
| Revision:

root / Pi / C / OpenACC / Makefile @ 183

History | View | Annotate | Download (737 Bytes)

1
# Compile all version of Pi_OpenACC using Nvidia GPU
2
# Cecill v2 Emmanuel QUEMENER <emmanuel.quemener@gmail.com>
3

    
4
SOURCE=Pi_OpenACC.c
5

    
6
COMPUTING=INT32 INT64 FP32 FP64
7
MARSAGLIA=SHR3 CONG MWC KISS
8

    
9
CC=pgcc
10
CFLAGS=-O3 
11
LIBRARY=
12
ACCFLAGS=-acc -ta=tesla:cc70 -Minfo=accel
13

    
14
all: $(SOURCE)
15

    
16
	$(foreach TVAR,$(COMPUTING),$(foreach TRND,$(MARSAGLIA),$(CC) $(CFLAGS) $(ACCFLAGS) -DT$(TVAR) -DT$(TRND) -DLONG -DTIME -o $(<:.c=)_$(TVAR)_$(TRND) $< $(LIBRARY); ) )
17

    
18
.PHONY: clean check mrproper
19

    
20
mrproper:
21
	rm -rf $(foreach SRC,$(SOURCE),$(foreach TVAR,$(COMPUTING),$(foreach TRND,$(MARSAGLIA),$(SRC:.c=)_$(TVAR)_$(TRND) ) ) )
22
	find . -name "*~" -exec rm {} \;
23

    
24
clean:
25
	find . -name "*~" -exec rm {} \;
26

    
27
check: $(EXECUTABLE)
28

    
29
	@echo "To be Defined"