-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 972 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# ############################################################
#
# Makefile
# PDS Exercise 4: VP-Tree & KD-Tree Construction and Search
# Versions: Sequential, CUDA
#
# Author: Panagiotis Karelis (9099)
# ############################################################
#
# 'make lib' build the libraries .o
# 'make clean' removes all .o
#
#define the shell to bash
SHELL := /bin/bash
#define the C/CUDA compiler to use
CC = nvcc
#define compile-time flags
CFLAGS = -w -O3 -Xcompiler -fcilkplus
CUDAFLAGS = -dc --fmad=false --ftz=false
#define directories containing header files
INCLUDES = -I./inc
#define Objects
OBJECTS = vptree_sequential.o kdtree_sequential.o kNN.o vptree_cuda.o kdtree_cuda.o
########################################################################
lib: $(OBJECTS)
%.o : src/%.cpp
$(CC) $(CFLAGS) $(CUDAFLAGS) $(INCLUDES) $< -o lib/$@
%.o : src/%.cu
$(CC) $(CFLAGS) $(CUDAFLAGS) $(INCLUDES) $< -o lib/$@
clean:
rm lib/*.o