view example/multiply/Makefile.gpu @ 2060:b70758c358dc draft

fix variable
author masa
date Sun, 31 Jan 2016 15:59:57 +0900
parents 0ae49bff30e9
children
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)

GPU_TASK_DIR = gpu
TASK_DIR  = ppe
TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
TASK_SRCS_EXCLUDE = 
TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) $(wildcard $(GPU_TASK_DIR)/*.cc)
TASK_OBJS = $(TASK_SRCS:.cc=.o)
CFLAGS = -D__CERIUM_GPU__
LIBS += `sdl-config --libs` -lGpuManager -framework opencl

.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 ppu-gdb ./$(TARGET) 

clean:
	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
	rm -f *~ \#*
	rm -f gpu/*~ gpu/\#*