Exercise 3 for the course "Parallel and distributed systems" of THMMY in AUTH university.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
SHELL := /bin/bash
|
|
|
|
|
|
|
|
# ============================================
|
|
|
|
# COMMANDS
|
|
|
|
|
|
|
|
CC = /usr/local/cuda/bin/nvcc
|
|
|
|
RM = rm -f
|
|
|
|
HOST_COMPILER = -ccbin gcc
|
|
|
|
CFLAGS= -arch=sm_21 -lm -O0 -I. -Wno-deprecated-gpu-targets
|
|
|
|
OBJ = meanshift.o meanshift_utils.o meanshift_kernels.o
|
|
|
|
DEPS = meanshift_utils.h meanshift_kernels.h
|
|
|
|
|
|
|
|
# ==========================================
|
|
|
|
# TARGETS
|
|
|
|
|
|
|
|
EXECUTABLES = meanshift
|
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
all: $(EXECUTABLES)
|
|
|
|
|
|
|
|
# ==========================================
|
|
|
|
# DEPENDENCIES (HEADERS)
|
|
|
|
|
|
|
|
%.o: %.cu $(DEPS)
|
|
|
|
$(CC) $(HOST_COMPILER) -x cu $(CFLAGS) -dc $< -o $@
|
|
|
|
|
|
|
|
.PRECIOUS: $(EXECUTABLES) $(OBJ)
|
|
|
|
|
|
|
|
# ==========================================
|
|
|
|
# EXECUTABLE (MAIN)
|
|
|
|
|
|
|
|
$(EXECUTABLES): $(OBJ)
|
|
|
|
$(CC) $(HOST_COMPILER) $(CFLAGS) $(OBJ) -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) *.o *~ $(EXECUTABLES)
|