changeset 1439:20e935f170c1 draft

add Makefile for gpu
author Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
date Sat, 07 Apr 2012 11:43:05 +0900
parents 3c787a21ff10
children d66dcb067c89
files TaskManager/Makefile TaskManager/Makefile.def TaskManager/Makefile.gpu
diffstat 3 files changed, 45 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Makefile	Sat Apr 07 11:25:06 2012 +0900
+++ b/TaskManager/Makefile	Sat Apr 07 11:43:05 2012 +0900
@@ -21,6 +21,9 @@
 parallel: FORCE
 	@$(MAKE) -f Makefile.parallel
 
+gpu: FORCE
+	@$(MAKE) -f Makefile.gpu
+
 FORCE:
 	-mkdir -p ../include/TaskManager
 	rsync `find . -name Test -prune -or -name '*.h' -print` ../include/TaskManager
--- a/TaskManager/Makefile.def	Sat Apr 07 11:25:06 2012 +0900
+++ b/TaskManager/Makefile.def	Sat Apr 07 11:43:05 2012 +0900
@@ -27,6 +27,10 @@
 IMPL_CELL_SRCS = $(IMPL_FIFO_SRCS) $(wildcard $(IMPL_CELL_DIR)/*.cc)
 IMPL_CELL_OBJS = $(IMPL_CELL_SRCS:.cc=.o)
 
+IMPL_GPU_DIR  = Gpu
+IMPL_GPU_SRCS = $(wildcard $(IMPL_GPU_DIR)/*.cc)
+IMPL_GPU_OBJS = $(IMPL_GPU_SRCS:.cc=.o)
+
 ABIBIT = 64
 
 OPT = -g -DMAIL_QUEUE -DNOT_CHECK #-DTASK_LIST_MAIL #-DEARLY_TOUCH -DUSE_CACHE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Makefile.gpu	Sat Apr 07 11:43:05 2012 +0900
@@ -0,0 +1,38 @@
+include ./Makefile.def
+TARGET = libGpuManager.a
+CFLAGS += -DHAS_POSIX_MEMALIGN
+
+ifdef LINUX
+CFLAGS += -lrt
+endif
+
+
+.SUFFIXES: .cc .o
+
+EXTRA_CFLAGS = -D__CERIUM_GPU__ 
+
+.cc.o:
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
+
+
+all: default
+default: $(TARGET)
+
+ALL_OBJS = $(KERN_MAIN_OBJS) $(KERN_PPE_OBJS) $(KERN_SCHED_OBJS) \
+	$(KERN_SYSTASK_OBJS) $(IMPL_FIFO_OBJS) $(KERN_MEM_OBJS) \
+	$(IMPL_GPU_OBJS) \
+	Cell/spe/SpeTaskManagerImpl.o Cell/CellTaskManagerImpl.o
+
+Makefile.dep: 
+	make -f Makefile.gpu depend
+
+depend:
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) $(ALL_OBJS:.o=.cc) -MM  > Makefile.dep
+
+$(TARGET): $(ALL_OBJS)
+	ar crus $@ $(ALL_OBJS)
+
+gpudistclean: gpuclean
+	rm -f $(TARGET)
+
+gpuclean: