Mercurial > hg > Game > Cerium
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 |
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 | 8 TASK_DIR = gpu |
1848 | 9 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc) ppe/QuickSort.cc |
1520 | 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 | 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 | 16 |
1520 | 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 | 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 | 32 debug: $(TARGET) |
1849 | 33 sudo lldb -- ./$(TARGET) -gpu -g |
34 | |
35 test : $(TARGET) | |
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 | 42 rm -f spe/*~ spe/\#* |
43 rm -f gpu/*~ gpu/\#* |