diff Renderer/Test/Makefile @ 512:01b64f21405e

ball_bound worked.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 21:39:57 +0900
parents 997490a061ee
children b273767962b8
line wrap: on
line diff
--- a/Renderer/Test/Makefile	Mon Oct 12 17:46:20 2009 +0900
+++ b/Renderer/Test/Makefile	Mon Oct 12 21:39:57 2009 +0900
@@ -1,35 +1,27 @@
 include ./Makefile.def
 
-
-TASK_DIR  = task
-TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
-TASK_SRCS_EXCLUDE = 
-TASK_SRCS = $(filter-out $(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
-TASK_OBJS = $(TASK_SRCS:.cc=.o)
-
 LIBS += -lFifoManager -lCerium
 
 CFLAGS += `sdl-config --cflags` `xml2-config --cflags`
 LIBS   += `sdl-config --libs` `xml2-config --libs` -lSDL_image -Wl,-framework,OpenGL
 
-.SUFFIXES: .cc .o
+.SUFFIXES: .cc .o .xml
 
 .cc.o:
 	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
 
 all: ball_bound
 
-ball_bound : ball_bound.o ball_xml.o
-	$(CC) -o $@ $< $(LIBS)
-
-ball_bound.cc : ball_xml.h
+BALL_BOUND_OBJ = ball_bound.o
+BALL_BOUND_XML = xml_file/Ball.xml
 
-# SGList.o: create_sg_list
-# 	$(CC) $(CFLAGS) $(INCLUDE) -c SGList.cc -o $@
+ball_bound : $(BALL_BOUND_OBJ) $(BALL_BOUND_XML).o 
+	$(CC) -o $@ $< $(BALL_BOUND_XML).o  $(LIBS)
 
-# generate ball_xml.h, ball_xml.cc
-ball_xml.cc: xml_file/Ball.xml
-	perl $(TOOL)/create_sglist.pl -o $@ $< 
+ball_bound.cc : $(BALL_BOUND_XML).h 
+
+$(BALL_BOUND_XML).cc $(BALL_BOUND_XML).h : $(BALL_BOUND_XML)
+	perl $(TOOL)/create_sglist.pl -o $@ $(BALL_BOUND_XML)
 
 
 run: $(TARGET)
@@ -43,8 +35,8 @@
 	$(CC) -MM -MG $(INCLUDE) $(CFLAGS) $(SRCS) $(TASK_SRCS) > depend.inc
 
 clean:
-	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
+	rm -f $(TARGET) $(OBJS) $(TASK_OBJS) *.o
 	rm -f *~ \#*
-	rm -f SGList.h SGList.cc
+	rm -f $(BALL_BOUND_XML).cc $(BALL_BOUND_XML).h $(BALL_BOUND_OBJ)
 
 -include depend.inc