changeset 115:44e3bf914155

fix Makefile
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Thu, 13 Nov 2008 10:46:36 +0900 (2008-11-13)
parents 9d13524c7136
children 60a4449d6575
files TaskManager/Makefile.def TaskManager/kernel/ppe/TaskManagerImpl.cc example/HelloWorld/Makefile.def example/HelloWorld/Makefile.ps3 example/HelloWorld/README example/README example/basic/Makefile.def example/basic/Makefile.linux example/basic/Makefile.macosx example/basic/Makefile.ps3 example/dependency_task/Makefile.def example/dependency_task/Makefile.linux example/dependency_task/Makefile.macosx example/dependency_task/Makefile.ps3 example/post_function/Makefile.def example/post_function/Makefile.linux example/post_function/Makefile.macosx example/post_function/Makefile.ps3 example/share_task/Makefile.def example/share_task/Makefile.linux example/share_task/Makefile.macosx example/share_task/Makefile.ps3
diffstat 22 files changed, 75 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Makefile.def	Thu Nov 13 10:24:16 2008 +0900
+++ b/TaskManager/Makefile.def	Thu Nov 13 10:46:36 2008 +0900
@@ -25,7 +25,7 @@
 IMPL_CELL_OBJS = $(IMPL_CELL_SRCS:.cc=.o)
 
 CC     = g++   
-CFLAGS = -O9 -Wall `sdl-config --cflags` -ffunction-sections -g # -D_PPE_DEBUG #-DDEBUG
+CFLAGS = -O9 -Wall `sdl-config --cflags` -g
 LIBS   = 
 
 INCLUDE = -I../include/TaskManager
\ No newline at end of file
--- a/TaskManager/kernel/ppe/TaskManagerImpl.cc	Thu Nov 13 10:24:16 2008 +0900
+++ b/TaskManager/kernel/ppe/TaskManagerImpl.cc	Thu Nov 13 10:46:36 2008 +0900
@@ -4,7 +4,7 @@
 #include "error.h"
 #include "../sys_task/SysTask.h"
 
-static HTaskPtr systask_start;
+//static HTaskPtr systask_start;
 static HTaskPtr systask_finish;
 
 void
--- a/example/HelloWorld/Makefile.def	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/HelloWorld/Makefile.def	Thu Nov 13 10:46:36 2008 +0900
@@ -2,12 +2,10 @@
 
 # include/library path
 # ex: macosx
-#CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium
-CERIUM = /Users/gongo/Source/Cerium
+#CERIUM = /Users/gongo/Source/Cerium
 
 # ex: linux/ps3
-#CERIUM = /home/gongo/Game_project/Cerium
-
+CERIUM = /home/gongo/Cerium
 
 CC      = g++
 CFLAGS  = -g -Wall -O9
--- a/example/HelloWorld/Makefile.ps3	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/HelloWorld/Makefile.ps3	Thu Nov 13 10:46:36 2008 +0900
@@ -11,7 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-LIBS = -lCellManager -lspe2 -lpthread -Wl,--gc-sections 
+LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections 
 
 .SUFFIXES: .cc .o
 
--- a/example/HelloWorld/README	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/HelloWorld/README	Thu Nov 13 10:46:36 2008 +0900
@@ -44,4 +44,4 @@
 
 �����Ǥϡ�Hello ������ 10 �Ĥ�
 3 �Ĥ� CPU �˿���ʬ���Ƽ¹Ԥ��Ƥ���Τ�
-ɽ������ˤʤäƤ��ʤ����Ȥ��狼��ޤ���
\ No newline at end of file
+ɽ������ˤʤäƤ��ʤ� -> ����˼¹Ԥ���Ƥ��뤳�Ȥ��狼��ޤ���
\ No newline at end of file
--- a/example/README	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/README	Thu Nov 13 10:46:36 2008 +0900
@@ -16,6 +16,31 @@
    最近の更新
 -----------------
 
+2008/11/13
+
+Makefile.macosx において、
+`sdl-config --libs` を追加してあります。
+例題の中で SDL を使うことはなくても書かれているのは、
+ライブラリ側に main() を置いたためです。
+
+http://d.hatena.ne.jp/hiratara/20080719/1216481600
+
+上を見てもらえばわかると思いますが、
+SDL では、ユーザが描いた main を SDL_main に置き換え、
+libSDL の中の main() を起動時のエントリに使ってます。
+なので、TaskManager/kernel/main.cc では #include <SDL.h> とか
+やってますが、そのせいで、ユーザ側でも sdl-config --libs をしないと
+「main() がないぞ」ってなリンカエラーが出るわけです。
+これは、MacOSX だけの問題で、Linux や PS3 上では問題ないので
+Makefile.macosx だけに記述しています。
+
+なので、MacOSX 上で例題を動かす場合、一瞬 SDL のウインドウが
+起動する系の動作をすると思いますが、無視してください。それ以外は動きますので。
+
+いずれはちゃんと切り分けたいところですが、今のところこんな感じで。
+
+
+
 2008/11/01
 
 main 関数はライブラリに閉じました。
--- a/example/basic/Makefile.def	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/basic/Makefile.def	Thu Nov 13 10:46:36 2008 +0900
@@ -2,7 +2,13 @@
 
 # include/library path
 # ex: macosx
-#CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium
+#CERIUM = /Users/gongo/Source/Cerium
 
 # ex: linux/ps3
-CERIUM = /home/gongo/Game_project/Cerium
\ No newline at end of file
+CERIUM = /home/gongo/Cerium
+
+CC      = g++
+CFLAGS  = -g -Wall -O9
+
+INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
+LIBS = -L${CERIUM}/TaskManager
--- a/example/basic/Makefile.linux	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/basic/Makefile.linux	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager
 
 .SUFFIXES: .cc .o
 
--- a/example/basic/Makefile.macosx	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/basic/Makefile.macosx	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager `sdl-config --libs`
 
 .SUFFIXES: .cc .o
 
--- a/example/basic/Makefile.ps3	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/basic/Makefile.ps3	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lCellManager -lspe2 -lpthread
+LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections 
 
 .SUFFIXES: .cc .o
 
--- a/example/dependency_task/Makefile.def	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/dependency_task/Makefile.def	Thu Nov 13 10:46:36 2008 +0900
@@ -2,7 +2,13 @@
 
 # include/library path
 # ex: macosx
-#CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium
+#CERIUM = /Users/gongo/Source/Cerium
 
 # ex: linux/ps3
-CERIUM = /home/gongo/Game_project/Cerium
\ No newline at end of file
+CERIUM = /home/gongo/Cerium
+
+CC      = g++
+CFLAGS  = -g -Wall -O9
+
+INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
+LIBS = -L${CERIUM}/TaskManager
--- a/example/dependency_task/Makefile.linux	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/dependency_task/Makefile.linux	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager
 
 .SUFFIXES: .cc .o
 
--- a/example/dependency_task/Makefile.macosx	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/dependency_task/Makefile.macosx	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager `sdl-config --libs`
 
 .SUFFIXES: .cc .o
 
--- a/example/dependency_task/Makefile.ps3	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/dependency_task/Makefile.ps3	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lCellManager -lspe2 -lpthread
+LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections 
 
 .SUFFIXES: .cc .o
 
--- a/example/post_function/Makefile.def	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/post_function/Makefile.def	Thu Nov 13 10:46:36 2008 +0900
@@ -2,7 +2,13 @@
 
 # include/library path
 # ex: macosx
-#CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium
+#CERIUM = /Users/gongo/Source/Cerium
 
 # ex: linux/ps3
-CERIUM = /home/gongo/Game_project/Cerium
\ No newline at end of file
+CERIUM = /home/gongo/Cerium
+
+CC      = g++
+CFLAGS  = -g -Wall -O9
+
+INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
+LIBS = -L${CERIUM}/TaskManager
--- a/example/post_function/Makefile.linux	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/post_function/Makefile.linux	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager
 
 .SUFFIXES: .cc .o
 
--- a/example/post_function/Makefile.macosx	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/post_function/Makefile.macosx	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager `sdl-config --libs`
 
 .SUFFIXES: .cc .o
 
--- a/example/post_function/Makefile.ps3	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/post_function/Makefile.ps3	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lCellManager -lspe2 -lpthread
+LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections 
 
 .SUFFIXES: .cc .o
 
--- a/example/share_task/Makefile.def	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/share_task/Makefile.def	Thu Nov 13 10:46:36 2008 +0900
@@ -2,8 +2,13 @@
 
 # include/library path
 # ex: macosx
-#CERIUM = /Users/e065737/bin/Game_project/Cerium
-#CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium
+#CERIUM = /Users/gongo/Source/Cerium
 
 # ex: linux/ps3
-CERIUM = /home/gongo/Game_project/Cerium
\ No newline at end of file
+CERIUM = /home/gongo/Cerium
+
+CC      = g++
+CFLAGS  = -g -Wall -O9
+
+INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
+LIBS = -L${CERIUM}/TaskManager
--- a/example/share_task/Makefile.linux	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/share_task/Makefile.linux	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager
 
 .SUFFIXES: .cc .o
 
--- a/example/share_task/Makefile.macosx	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/share_task/Makefile.macosx	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lFifoManager
+LIBS += -lFifoManager `sdl-config --libs`
 
 .SUFFIXES: .cc .o
 
--- a/example/share_task/Makefile.ps3	Thu Nov 13 10:24:16 2008 +0900
+++ b/example/share_task/Makefile.ps3	Thu Nov 13 10:46:36 2008 +0900
@@ -11,11 +11,7 @@
 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
 TASK_OBJS = $(TASK_SRCS:.cc=.o)
 
-CC      = g++
-CFLAGS  = -g -Wall# -O9 #-DDEBUG
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager -lCellManager -lspe2 -lpthread
+LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections 
 
 .SUFFIXES: .cc .o