-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (30 loc) · 759 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
# --- MACROS
# define program name
MAIN= subdivide
# define the C compiler to use
CC= nvcc
# define any compile-time flags
CFLAGS= -O3 -rdc=true
# define any libraries to link into executable
LIBS=
ifeq ($(OS),Windows_NT)
CFLAGS += -allow-unsupported-compiler
MAIN= subdivide.exe
else
LIBS += -lm
endif
# define C source files
SRCS= ${wildcard src/*.cu} ${wildcard src/**/*.cu} ${wildcard src/**/**/*.cu}
# define C header files
HDRS= ${wildcard src/*.cuh} ${wildcard src/**/*.cuh} ${wildcard src/**/**/*.cuh}
# --- TARGETS
all: ${MAIN}
#Builds the program
${MAIN}: ${SRCS} ${HDRS}
@echo #
@echo "-- BUILDING PROGRAM --"
${CC} ${SRCS} ${CFLAGS} ${LIBS} -o ${MAIN}
clean:
@echo #
@echo "-- CLEANING PROJECT FILES --"
$(RM) *.o ${MAIN}