forked from crrossi/GPowerU
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 618 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (26 loc) · 618 Bytes
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
SDIR=src
ODIR=obj
IDIR=include
BDIR=bin
NVCC=nvcc
CFLAGS= -I$(IDIR) -gencode arch=compute_80,code=sm_80
LDFLAGS=-lcuda -lnvidia-ml -lpthread -std=c++11
#LDFLAGS=-lcuda -lcublas -lcudart -lnvidia-ml -lpthread -std=c++11
MKDIR_P=mkdir -p
.PHONY: all clean
vpath %.cu $(SDIR)
# Create Directories
createDir:
${MKDIR_P} ${ODIR}
${MKDIR_P} ${BDIR}
# Compile C files
$(ODIR)/%.o : %.cu
$(NVCC) $(CFLAGS) -o $@ -c $<
TARGET=createDir $(BDIR)/powerMonitor
all: $(TARGET)
$(BDIR)/powerMonitor: $(ODIR)/powerMonitor.o $(ODIR)/gPower.o
$(NVCC) $(LDFLAGS) -o $@ $^
# Clean files
clean:
rm $(ODIR)/*
rm $(BDIR)/*