annotate example/many_task/Makefile.gpu @ 1849:0296fa2dfe6d draft

add test
author Shinji KONO
date Sat, 21 Dec 2013 09:00:27 +0900
parents b2d2a16d3b84
children c21bd32e20b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1518
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 include ./Makefile.def
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 SRCS_TMP = $(wildcard *.cc)
1544
5c4e3f0d372a many_task add task array
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1536
diff changeset
4 SRCS_EXCLUDE = sort-compat.cc sort_test.cc gpu/gpu_task_init.cc # 除外するファイルを書く
1518
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 OBJS = $(SRCS:.cc=.o)
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
1520
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
8 TASK_DIR = gpu
1848
b2d2a16d3b84 remove file
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1738
diff changeset
9 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc) ppe/QuickSort.cc
1520
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
10 TASK_SRCS_EXCLUDE = sort_test.cc
1518
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 TASK_OBJS = $(TASK_SRCS:.cc=.o)
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
1520
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
14 CC += $(ABI)
1536
3d5b540f3aa9 change CPU_TYPE by arg.
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1520
diff changeset
15 CFLAGS += -D__CERIUM_GPU__
1519
9a5f87f4b60f add spe_cpu for gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1518
diff changeset
16
1520
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
17 LIBS = -L${CERIUM}/TaskManager -DUSE_SIMPLE_TASK -lGpuManager -framework opencl `sdl-config --libs`
1518
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 .SUFFIXES: .cc .o
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 .cc.o:
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
1520
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
24 all: $(TARGET)
1518
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 $(TARGET): $(OBJS) $(TASK_OBJS)
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 link:
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
1520
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
32 debug: $(TARGET)
1849
0296fa2dfe6d add test
Shinji KONO
parents: 1848
diff changeset
33 sudo lldb -- ./$(TARGET) -gpu -g
0296fa2dfe6d add test
Shinji KONO
parents: 1848
diff changeset
34
0296fa2dfe6d add test
Shinji KONO
parents: 1848
diff changeset
35 test : $(TARGET)
0296fa2dfe6d add test
Shinji KONO
parents: 1848
diff changeset
36 ./$(TARGET) -gpu -g
1518
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 clean:
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 rm -f *~ \#*
940ffd32e5bd add many_task/Makefile.gpu
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 rm -f ppe/*~ ppe/\#*
1520
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
42 rm -f spe/*~ spe/\#*
031f26b15ae6 add many_task/gpu
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1519
diff changeset
43 rm -f gpu/*~ gpu/\#*