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