109
|
1 include ./Makefile.def
|
|
2
|
|
3 SRCS_TMP = $(wildcard *.cpp)
|
|
4 SRCS_EXCLUDE = # ½ü³°
|
|
5 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
|
|
6 OBJS = $(SRCS:.cpp=.o)
|
|
7
|
|
8 TASK_DIR = task
|
|
9 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cpp)
|
|
10 TASK_SRCS_EXCLUDE = span_pack_draw.cpp
|
|
11 TASK_SRCS = $(filter-out $(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
|
|
12 TASK_OBJS = $(TASK_SRCS:.cpp=.o)
|
|
13
|
118
|
14 LIBS += -lCellManager -lspe2 -lpthread
|
109
|
15
|
118
|
16 CFLAGS += `sdl-config --cflags` `xml2-config --cflags`
|
|
17 LIBS += `sdl-config --libs` -lSDL_image -lGL `xml2-config --libs`
|
109
|
18
|
|
19 .SUFFIXES: .cpp .o
|
|
20
|
|
21 .cpp.o:
|
118
|
22 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
|
109
|
23
|
|
24 all: $(TARGET) speobject
|
|
25
|
|
26 $(TARGET): $(OBJS) $(TASK_OBJS)
|
118
|
27 $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
|
109
|
28
|
|
29 speobject:
|
|
30 cd spe; $(MAKE)
|
|
31
|
|
32 run: $(TARGET)
|
|
33 sudo ./$(TARGET) -width 576 -height 384 -bpp 32
|
|
34
|
|
35 debug: $(TARGET)
|
|
36 sudo ppu-gdb ./$(TARGET)
|
|
37
|
|
38 depend:
|
118
|
39 makedepend -- $(CFLAGS) $(LIBS) $(INCLUDE) -- $(SRCS) $(TASK_SRCS)
|
109
|
40
|
|
41 clean:
|
|
42 rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
|
|
43 rm -f *~ \#*
|
|
44 cd task; rm -f *~ \#*
|
|
45 cd spe; $(MAKE) clean
|
|
46
|