view TaskManager/Test/test_render/Makefile.linux @ 533:6c56957ef335

test_render/Makefile.linux
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Wed, 21 Oct 2009 12:02:39 +0900
parents cd2985cd3461
children c878c27678f4
line wrap: on
line source

include ./Makefile.def

SRCS_TMP = $(wildcard *.cc) $(wildcard Application/*.cc)
SRCS_EXCLUDE =   # 除外
SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
OBJS = $(SRCS:.cc=.o)

TASK_DIR  = task
TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
TASK_SRCS_EXCLUDE = span_pack_draw.cc
TASK_SRCS = $(filter-out $(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
TASK_OBJS = $(TASK_SRCS:.cc=.o)

LIBS += -lFifoManager

CFLAGS += `sdl-config --cflags` `xml2-config --cflags`
LIBS   += `sdl-config --libs` -lSDL_image -lGL `xml2-config --libs`

.SUFFIXES: .cpp .o .cc

.cpp.o:
	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
.cc.o:
	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@

all: SGList.o $(TARGET)

$(TARGET): $(OBJS) $(TASK_OBJS)
	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)

SGList.o: create_sg_list
	$(CC) $(CFLAGS) $(INCLUDE) -c SGList.cc -o $@

create_sg_list:
	@if [ ! -f SGList.h ]; then \
		cd tools/;\
		./create_sglist.pl ../xml_file/*.xml;\
		cd ../;\
	fi

run: $(TARGET)
	sudo ./$(TARGET) -width 576 -height 384 -bpp 32

debug: $(TARGET)
	sudo ppu-gdb ./$(TARGET) 

depend:
	$(RM) depend.inc
	$(CC) -MM -MG $(INCLUDE) $(CFLAGS) $(SRCS) $(TASK_SRCS) > depend.inc

clean:
	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
	rm -f *~ \#*
	rm -f SGList.h SGList.cc