Mercurial > hg > Game > Cerium
view example/Cuda/Makefile @ 1927:4eefec26e3e2 draft
add file
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 31 Jan 2014 07:15:07 +0900 |
parents | 273638411ebf |
children | a68dbdf9b429 |
line wrap: on
line source
include ./Makefile.def SRCS_TMP = $(wildcard *.cc) SRCS_EXCLUDE = # 除外するファイルを書く SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP)) OBJS = $(SRCS:.cc=.o) CUDA_SRCS_TMP = $(wildcard *.cu) CUDA_SRCS_EXCLUDE = # 除外するファイルを書く CUDA_SRCS = $(filter-out $(CUDA_SRCS_EXCLUDE),$(CUDA_SRCS_TMP)) CUDA_OBJS = $(CUDA_SRCS:.cu=.ptx) CC += $(ABI) LIBS = -F/Library/Frameworks -framework CUDA INCLUDE = -I/Developer/NVIDIA/CUDA-5.5/include .SUFFIXES: .cc .o .cc.o: $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ all: $(TARGET) $(TARGET): $(OBJS) $(TASK_OBJS) $(CUDA_SRCS_TMP) $(NVCC) $(NVCCFLAGS) $(CUDA_SRCS_TMP) $(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) $(CUDA_OBJS) rm -f *~ \#*