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.

43 lines
868 B

7 years ago
SHELL := /bin/bash
# ============================================
# COMMANDS
7 years ago
CC = nvcc
HOST_COMPILER = -ccbin gcc
7 years ago
CUDA_FLAGS = -arch=sm_21 -Wno-deprecated-gpu-targets
C_FLAGS = -lm -O3 -I.
COMPILE_FLAGS = $(HOST_COMPILER) -x cu $(CUDA_FLAGS) -dc $(C_FLAGS)
LINK_FLAGS = $(HOST_COMPILER) $(CUDA_FLAGS) $(C_FLAGS)
OBJ = meanshift.o meanshift_utils.o meanshift_kernels.o
DEPS = meanshift_utils.h meanshift_kernels.h
7 years ago
7 years ago
RM = rm -f
7 years ago
# ==========================================
# TARGETS
EXECUTABLES = meanshift
7 years ago
.PHONY: all clean
7 years ago
all: $(EXECUTABLES)
# ==========================================
# DEPENDENCIES (HEADERS)
%.o: %.cu $(DEPS)
7 years ago
$(CC) $(COMPILE_FLAGS) $< -o $@
.PRECIOUS: $(EXECUTABLES) $(OBJ)
# ==========================================
# EXECUTABLE (MAIN)
$(EXECUTABLES): $(OBJ)
7 years ago
$(CC) $(LINK_FLAGS) $(OBJ) -o $@
7 years ago
clean:
$(RM) *.o *~ $(EXECUTABLES)