changeset 1531:4443d59a8210 draft

SDL.h in main.cc
author yuhi@cr.ie.u-ryukyu.ac.jp
date Fri, 07 Dec 2012 15:46:27 +0900
parents c7f0e6eb1d50
children 7bba18c7da14
files Renderer/Engine/Makefile.def Renderer/Test/Makefile Renderer/Test/Makefile.def Renderer/Test/Makefile.gpu TaskManager/Cell/spe/SpeTaskManagerImpl.h TaskManager/Makefile.def TaskManager/kernel/main.cc TaskManager/kernel/ppe/TaskLog.h
diffstat 8 files changed, 150 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/Makefile.def	Thu Dec 06 16:49:41 2012 +0900
+++ b/Renderer/Engine/Makefile.def	Fri Dec 07 15:46:27 2012 +0900
@@ -4,12 +4,13 @@
 
 ABIBIT = 64 
 ABI = -m$(ABIBIT)
-CC      = g++
+CC      = clang++
+CXX	= clang++
 
 OPT	=  -g -DUSE_TASKARRAY -DUSE_PIPELINE -DUSE_SEGMENT 
 # OPT	= -O9 -DUSE_TASKARRAY -DUSE_PIPELINE -DUSE_SEGMENT  
 
 CFLAGS  = -Wall $(ABI) $(OPT)  #  -DDEBUG
-
+CXXFLAGS = $(CFLAGS)
 INCLUDE = -I$(CERIUM)/include/TaskManager -I.
 # LIBS = -L$(CERIUM)/TaskManager -m$(ABIBIT)
--- a/Renderer/Test/Makefile	Thu Dec 06 16:49:41 2012 +0900
+++ b/Renderer/Test/Makefile	Fri Dec 07 15:46:27 2012 +0900
@@ -8,7 +8,8 @@
 	make -f Makefile.linux $*
 cell:
 	make -f Makefile.cell $*
-
+gpu:  
+	make -f Makefile.gpu $*
 
 clean:
 	make -f Makefile.macosx clean
--- a/Renderer/Test/Makefile.def	Thu Dec 06 16:49:41 2012 +0900
+++ b/Renderer/Test/Makefile.def	Fri Dec 07 15:46:27 2012 +0900
@@ -3,9 +3,11 @@
 
 ABIBIT = 64
 ABI =  -m$(ABIBIT)
-CC      = g++
+CC      = clang++
+CXX	=clang++
 #CFLAGS  =  -Wall $(ABI) -g
 CFLAGS  =  -Wall $(ABI) -O9 #-g   # -O -DDEBUG
+CXXFLAGS = $(CFLAGS)
 
 ALL = collision_effect collada motion_man ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum send_linda dynamic writer chain_old viewer viewer_2 # SgRootChange 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Renderer/Test/Makefile.gpu	Fri Dec 07 15:46:27 2012 +0900
@@ -0,0 +1,136 @@
+include ./Makefile.def
+
+LIBS += -lCerium -lGpuManager -framework OpenCL
+
+CFLAGS += `sdl-config --cflags` `xml2-config --cflags` `freetype-config --cflags` $(INCLUDE)  
+LIBS   += `sdl-config --libs` `xml2-config --libs` `freetype-config --libs` -lSDL_image -Wl,-framework,OpenGL 
+
+.SUFFIXES: .proto .pb.o .pb.cc .cc .o .xml .xml.h .xml.cc
+.PRECIOUS: %.pb.cc
+.cc.o:
+	$(CC) $(CFLAGS)  -c $< -o $@
+
+%.pb.cc: $(PROTODIR)/%.proto
+	$(PROTO) $(PROTOFLAGS) $<
+
+COLLISION_OBJ = collision_effect.o
+collision_effect : $(COLLISION_OBJ)
+	$(CC) $(CFLAGS) -o $@ $?   $(LIBS)
+
+COLLADA_OBJ = collada.o
+collada : $(COLLADA_OBJ)
+	$(CC) $(CFLAGS) -o $@ $?   $(LIBS)
+
+STR_OBJ = print_string.o
+print_string : $(STR_OBJ)
+	$(CC) $(CFLAGS) -o $@ $?   $(LIBS)
+
+MOTION_MAN_OBJ = motion_man.o
+motion_man : $(MOTION_MAN_OBJ)
+	$(CC) $(CFLAGS) -o $@ $?   $(LIBS)
+
+BALL_BOUND_OBJ = ball_bound.o
+ball_bound : $(BALL_BOUND_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?   $(LIBS)
+
+BOSS_OBJ = boss1_action.o
+boss1_action : $(BOSS_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?   $(LIBS)
+
+DIRECTION_OBJ = direction.o
+direction : $(DIRECTION_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+GAPLAN_OBJ = gaplant.o gaplant_action.o back_action.o ball_action.o
+gaplant : $(GAPLAN_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+IESHOOT_OBJ = ieshoot.o
+ieshoot : $(IESHOOT_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+NODE_OBJ = node.o
+node : $(NODE_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+PANEL_OBJ = panel.o
+panel : $(PANEL_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+UNIV_OBJ = universe.o
+universe : $(UNIV_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+UNTITLED_OBJ = untitled.o
+untitled : $(UNTITLED_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+VACUUM_OBJ = vacuum.o cube.o game_over.o title.o
+vacuum : $(VACUUM_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+PROPERTY_OBJ = property_test.o
+property_test : $(PROPERTY_OBJ)
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+DYNAMIC_OBJ = dynamic_create.o 
+dynamic : $(DYNAMIC_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+SENDLINDA_OBJ = send_linda.o
+send_linda : $(SENDLINDA_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+WRITER_OBJ = writer.o
+writer : $(WRITER_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+CHAIN_OBJ = chain_old.o
+chain_old : $(CHAIN_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+SGCHANGE_OBJ = SgRootChange.o
+SgRootChange : $(SGCHANGE_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+VIEWER_OBJ = viewer_2.o
+viewer : $(VIEWER_OBJ) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+AQUARIUM_OBJ = aquarium.pb.o aquarium.o
+aquarium : $(AQUARIUM_OBJ)
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS) $(PROTOLIBS)
+
+NETWORK_OBJ = network_game.pb.o network.o
+network : $(NETWORK_OBJ)
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS) $(PROTOLIBS)
+
+INIT_AQUARIUM_OBJ = aquarium.pb.o init_aquarium.o
+init_aquarium : $(INIT_AQUARIUM_OBJ)
+	$(CC) $(CFLAGS) -o $@ $? $(LIBS) $(PROTOLIBS)
+
+TEST_LINDA_OBJ = aquarium.pb.o test_linda.o
+test_linda : $(TEST_LINDA_OBJ)
+	$(CC) $(CFLAGS) -o $@ $? $(LIBS) $(PROTOLIBS)
+
+VIEWER_OBJ2 = viewer_2.o
+viewer_2 : $(VIEWER_OBJ2) 
+	$(CC) $(CFLAGS) -o $@ $?    $(LIBS)
+
+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) *.o
+	rm -f *~ \#* $(ALL)
+	rm -f $(BALL_BOUND_XML).cc $(BALL_BOUND_XML).h $(BALL_BOUND_OBJ)
+	rm -f *.pb.{cc,h}
+
+-include depend.inc
--- a/TaskManager/Cell/spe/SpeTaskManagerImpl.h	Thu Dec 06 16:49:41 2012 +0900
+++ b/TaskManager/Cell/spe/SpeTaskManagerImpl.h	Fri Dec 07 15:46:27 2012 +0900
@@ -21,7 +21,7 @@
     void start_profile();
     void show_profile();
     void export_task_log();
-    HTaskPtr create_task(int cmd);
+    virtual HTaskPtr create_task(int cmd);
     HTaskPtr create_task(int cmd, memaddr rbuf, long r_size, memaddr wbuf, long w_size);
     HTaskPtr create_task_array(int cmd, memaddr rbuf, long rs, memaddr wbuf, long ws);
     TaskListPtr createTaskList() { return 0; }
--- a/TaskManager/Makefile.def	Thu Dec 06 16:49:41 2012 +0900
+++ b/TaskManager/Makefile.def	Fri Dec 07 15:46:27 2012 +0900
@@ -38,9 +38,10 @@
 
 
 
-
-CC     = clang++
+CC   = clang++
+CXX     = clang++
 CFLAGS = -Wall `sdl-config --cflags` -m$(ABIBIT)   $(OPT)
+CXXFLAGS = $(CFLAGS)
 LIBS   =  -m$(ABIBIT)
 
 INCLUDE = -I../include/TaskManager
--- a/TaskManager/kernel/main.cc	Thu Dec 06 16:49:41 2012 +0900
+++ b/TaskManager/kernel/main.cc	Fri Dec 07 15:46:27 2012 +0900
@@ -1,6 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
-// #include <SDL.h>
+#include <SDL.h>
 #include "TaskManager.h"
 
 /*!
--- a/TaskManager/kernel/ppe/TaskLog.h	Thu Dec 06 16:49:41 2012 +0900
+++ b/TaskManager/kernel/ppe/TaskLog.h	Fri Dec 07 15:46:27 2012 +0900
@@ -16,7 +16,6 @@
 
 class TaskLog {
 public:
-
     /* variables */
     int mtask_id;
     int cmd;
@@ -46,6 +45,7 @@
 private:
     // Unique id
 
+
 };
 
 #endif