This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcompileHmppOpenACC.mk
73 lines (56 loc) · 1.66 KB
/
compileHmppOpenACC.mk
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Copyright 2008 - 2010 CAPS entreprise. All rights reserved.
#
ATI_DISPLAY = DISPLAY=:0.0
GCC = gcc
ICC = icc
HMPP = hmpp #--nvcc-options -arch,sm_10
# if running on GPU of compute capacity 1.0, put the following at the end of the previous line
# --nvcc-options -arch,sm_10
CFLAGS = -O2 -p -w
CPPFLAGS = #-I../../../../common
LDFLAGS =
HMPPFLAGS = --codelet-required
VPATH = ../../../../common
CLEANFILES = *.exe *.so *.so.* *.cu *.cu.* *.linkinfo
BIN = $(EXE_NAME)
## choose your compiler here ##
CC = $(GCC)
#ifeq($(CC),$(GCC))
FLAGS = $(GCC_FLAGS)
#else
#FLAGS = $(ICC_FLAGS)
#endif
.DEFAULT: all
all:
$(HMPP) $(HMPPFLAGS) $(DFLAGS) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(EXE_NAME).exe $(MAIN_FILE)
#exe: $(BIN).exe
#run: exe
# $(ATI_DISPLAY) ./$(BIN).exe
#verbose:
# $(MAKE) $(BIN).exe DFLAGS="-k -d"
# $(MAKE) run HMPP_VERBOSITY=9
# $(GPROF) ./$(BIN).exe
#%.exe: %.c $(DEPS)
# $(HMPP) $(HMPPFLAGS) $(DFLAGS) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(EXE_NAME).exe $(MAIN_FILE)
#%.o: %.c
# $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c $< -o $@
clean:
rm -f $(CLEANFILES)
help:
@echo "#"
@echo "# Copyright 2008 - 2010 CAPS entreprise. All rights reserved."
@echo "#"
@echo ""
@echo "Targets available are :"
@echo ""
@echo " make all : compiles and runs the application"
@echo ""
@echo " make exe : compiles the application"
@echo ""
@echo " make run : runs the execution"
@echo ""
@echo " make verbose : compiles and launches the execution with the higher level of verbosity"
@echo ""
@echo " make clean : deletes files generated by make"
@echo ""