annotate example/HelloWorld/Makefile.cell @ 1716:c12df61ded45 draft

fix gpu profile. not work yet
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Tue, 15 Oct 2013 17:21:10 +0900
parents a0ea7d9b6faf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 include ./Makefile.def
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2
631
30dd8a3deb4a Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 253
diff changeset
3 ABIBIT=32
30dd8a3deb4a Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 253
diff changeset
4 CFLAGS += -m$(ABIBIT) -D__CERIUM_CELL__
30dd8a3deb4a Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 253
diff changeset
5
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 SRCS_TMP = $(wildcard *.cc)
1052
a0ea7d9b6faf Makefile utf-8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
7 SRCS_EXCLUDE = # 除外するファイルを書く
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9 OBJS = $(SRCS:.cc=.o)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 TASK_DIR = ppe
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 TASK_SRCS_EXCLUDE =
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15 TASK_OBJS = $(TASK_SRCS:.cc=.o)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16
115
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 114
diff changeset
17 LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 .SUFFIXES: .cc .o
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 .cc.o:
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 all: $(TARGET) speobject
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26 $(TARGET): $(OBJS) $(TASK_OBJS)
631
30dd8a3deb4a Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 253
diff changeset
27 $(CC) $(CFLAGS) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
28
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
29 speobject:
631
30dd8a3deb4a Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 253
diff changeset
30 cd spe; $(MAKE) ABIBIT=$(ABIBIT)
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31
253
0c9c9906d777 usr_help_str is nessesary for example
tkaito@localhost.localdomain
parents: 115
diff changeset
32 run:
0c9c9906d777 usr_help_str is nessesary for example
tkaito@localhost.localdomain
parents: 115
diff changeset
33 ./$(TARGET) -cpu 6
0c9c9906d777 usr_help_str is nessesary for example
tkaito@localhost.localdomain
parents: 115
diff changeset
34
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35 link:
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36 $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 debug: $(TARGET)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39 sudo ppu-gdb ./$(TARGET)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 clean:
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42 rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
43 rm -f *~ \#*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
44 rm -f ppe/*~ ppe/\#*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 cd spe; $(MAKE) clean