annotate example/Cuda/Makefile @ 1954:30b95f372a0d draft

fix read_size
author masa
date Thu, 06 Feb 2014 20:08:08 +0900
parents 4eefec26e3e2
children a68dbdf9b429
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 include ./Makefile.def
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 SRCS_TMP = $(wildcard *.cc)
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
4 SRCS_EXCLUDE = # 除外するファイルを書く
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 OBJS = $(SRCS:.cc=.o)
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
8 CUDA_SRCS_TMP = $(wildcard *.cu)
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
9 CUDA_SRCS_EXCLUDE = # 除外するファイルを書く
1920
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
10 CUDA_SRCS = $(filter-out $(CUDA_SRCS_EXCLUDE),$(CUDA_SRCS_TMP))
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
11 CUDA_OBJS = $(CUDA_SRCS:.cu=.ptx)
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
12
1920
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
13 CC += $(ABI)
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
14
1920
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
15 LIBS = -F/Library/Frameworks -framework CUDA
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
16 INCLUDE = -I/Developer/NVIDIA/CUDA-5.5/include
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
17
1920
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
18 .SUFFIXES: .cc .o
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
19 .cc.o:
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
20 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 all: $(TARGET)
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
1920
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
24 $(TARGET): $(OBJS) $(TASK_OBJS) $(CUDA_SRCS_TMP)
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
25 $(NVCC) $(NVCCFLAGS) $(CUDA_SRCS_TMP)
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 link:
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 debug: $(TARGET)
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 sudo gdb ./$(TARGET)
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 clean:
1920
273638411ebf fix makefile
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1919
diff changeset
35 rm -f $(TARGET) $(OBJS) $(TASK_OBJS) $(CUDA_OBJS)
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 rm -f *~ \#*