Mercurial > hg > Game > Cerium
annotate example/HelloWorld/Makefile.cell @ 839:1001c4bea1a0 draft
if unnecessary
author | Yutaka_Kinjyo |
---|---|
date | Fri, 28 May 2010 03:24:52 +0900 |
parents | 30dd8a3deb4a |
children | a0ea7d9b6faf |
rev | line source |
---|---|
109 | 1 include ./Makefile.def |
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 | 6 SRCS_TMP = $(wildcard *.cc) |
7 SRCS_EXCLUDE = # 除外するファイルを書く | |
8 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP)) | |
9 OBJS = $(SRCS:.cc=.o) | |
10 | |
11 TASK_DIR = ppe | |
12 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc) | |
13 TASK_SRCS_EXCLUDE = | |
14 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) | |
15 TASK_OBJS = $(TASK_SRCS:.cc=.o) | |
16 | |
115 | 17 LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections |
109 | 18 |
19 .SUFFIXES: .cc .o | |
20 | |
21 .cc.o: | |
22 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ | |
23 | |
24 all: $(TARGET) speobject | |
25 | |
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 | 28 |
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 | 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 | 35 link: |
36 $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS) | |
37 | |
38 debug: $(TARGET) | |
39 sudo ppu-gdb ./$(TARGET) | |
40 | |
41 clean: | |
42 rm -f $(TARGET) $(OBJS) $(TASK_OBJS) | |
43 rm -f *~ \#* | |
44 rm -f ppe/*~ ppe/\#* | |
45 cd spe; $(MAKE) clean |