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 += -lFifoManager
|
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)
|
|
25
|
|
26 $(TARGET): $(OBJS) $(TASK_OBJS)
|
118
|
27 $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
|
109
|
28
|
|
29 run: $(TARGET)
|
|
30 sudo ./$(TARGET) -width 576 -height 384 -bpp 32
|
|
31
|
|
32 debug: $(TARGET)
|
|
33 sudo ppu-gdb ./$(TARGET)
|
|
34
|
221
|
35 depend:
|
|
36 $(RM) depend.inc
|
|
37 $(CC) -MM -MG $(INCLUDE) $(CFLAGS) $(SRCS) $(TASK_SRCS) > depend.inc
|
|
38
|
109
|
39 clean:
|
|
40 rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
|
|
41 rm -f *~ \#* |