comparison TaskManager/test/SetCpuTest/Makefile.gpu @ 1628:b3edf26734f5 draft

add SetCpuTest
author shohei kokubo
date Mon, 03 Jun 2013 19:17:17 +0900
parents
children 6c0b6947c231
comparison
equal deleted inserted replaced
1626:4fed76f4d101 1628:b3edf26734f5
1 include ./Makefile.def
2
3 SRCS_TMP = $(wildcard *.cc)
4 SRCS_EXCLUDE = # 除外するファイルを書く
5 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
6 OBJS = $(SRCS:.cc=.o)
7
8 TASK_DIR = gpu
9 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
10 TASK_SRCS_EXCLUDE =
11 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
12 TASK_OBJS = $(TASK_SRCS:.cc=.o)
13
14 LIBS += `sdl-config --libs` -lGpuManager -framework opencl
15
16 .SUFFIXES: .cc .o
17
18 .cc.o:
19 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
20
21 all: $(TARGET)
22
23 $(TARGET): $(OBJS) $(TASK_OBJS)
24 $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
25
26 link:
27 $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
28
29 test:
30 cpus=0;./$(TARGET) -cpu $$cpus
31 cpus=1;./$(TARGET) -cpu $$cpus
32 cpus=2;./$(TARGET) -cpu $$cpus
33 cpus=4;./$(TARGET) -cpu $$cpus
34 cpus=8;./$(TARGET) -cpu $$cpus
35 cpus=16;./$(TARGET) -cpu $$cpus
36 cpus=24;./$(TARGET) -cpu $$cpus
37
38 cpus=0;./$(TARGET) -cpu $$cpus -gpu
39 cpus=1;./$(TARGET) -cpu $$cpus -gpu
40 cpus=2;./$(TARGET) -cpu $$cpus -gpu
41 cpus=4;./$(TARGET) -cpu $$cpus -gpu
42 cpus=8;./$(TARGET) -cpu $$cpus -gpu
43 cpus=16;./$(TARGET) -cpu $$cpus -gpu
44 cpus=24;./$(TARGET) -cpu $$cpus -gpu
45
46 debug: $(TARGET)
47 sudo ppu-gdb ./$(TARGET)
48
49 clean:
50 rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
51 rm -f *~ \#*
52 rm -f ppe/*~ ppe/\#*
53 cd spe; $(MAKE) clean