Mercurial > hg > Game > Cerium
changeset 1540:f3d0870648ff draft
add makefile
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 16 Dec 2012 21:13:10 +0900 |
parents | 6840fa213308 |
children | 99c9ed2932a0 |
files | example/word_count/Makefile.gpu |
diffstat | 1 files changed, 58 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/word_count/Makefile.gpu Sun Dec 16 21:13:10 2012 +0900 @@ -0,0 +1,58 @@ +include ./Makefile.def + +SRCS_TMP = $(wildcard *.cc) +SRCS_EXCLUDE = # 除外するファイルを書く +SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP)) +OBJS = $(SRCS:.cc=.o) + +TASK_DIR = gpu +TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc) +TASK_SRCS_EXCLUDE = sort_test.cc +TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) +TASK_OBJS = $(TASK_SRCS:.cc=.o) + +CC += $(ABI) +CFLAGS += -D__CERIUM_GPU__ + +INCLUDE = -I${CERIUM}/include/TaskManager -I. -I.. +LIBS = -L${CERIUM}/TaskManager -DUSE_SIMPLE_TASK -lGpuManager -framework opencl `sdl-config --libs` + +.SUFFIXES: .cc .o + +.cc.o: + $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ + +all: $(TARGET) + +$(TARGET): $(OBJS) $(TASK_OBJS) + $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS) + +link: + $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS) + +debug: $(TARGET) + sudo gdb ./$(TARGET) + +clean: + rm -f $(TARGET) $(OBJS) $(TASK_OBJS) + rm -f *~ \#* + rm -f ppe/*~ ppe/\#* + rm -f spe/*~ spe/\#* + rm -f gpu/*~ gpu/\#* + + + + + + + + + + + + + + + + +