annotate example/Prime/Makefile.cell @ 1407:976f7b77f0bf draft

fix Makefile
author Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Feb 2012 17:42:50 +0900
parents d910c8377a09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1171
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 include ./Makefile.def
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 ABIBIT=32
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 CFLAGS += -m$(ABIBIT) -D__CERIUM_CELL__
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 SRCS_TMP = $(wildcard *.cc)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 SRCS_EXCLUDE = # 除外するファイルを書く
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 OBJS = $(SRCS:.cc=.o)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 TASK_DIR = ppe
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 TASK_SRCS_EXCLUDE =
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 TASK_OBJS = $(TASK_SRCS:.cc=.o)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 .SUFFIXES: .cc .o
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 .cc.o:
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 all: $(TARGET) speobject
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 $(TARGET): $(OBJS) $(TASK_OBJS)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 $(CC) $(CFLAGS) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 speobject:
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 cd spe; $(MAKE) ABIBIT=$(ABIBIT)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 run:
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 ./$(TARGET) -cpu 6
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 link:
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 debug: $(TARGET)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 sudo ppu-gdb ./$(TARGET)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 clean:
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 rm -f *~ \#*
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 rm -f ppe/*~ ppe/\#*
d910c8377a09 add prime example
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 cd spe; $(MAKE) clean