forked from MartinPersson/HOTlab
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (44 loc) · 2.09 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
NVCC=nvcc
CC=clang-10
CXX=clang++-10
CFLAGS=-Wall -fPIC
CXXFLAGS=-std=c++17 -Wall -fPIC
LDFLAGS=-lpthread -pthread
NVCCFLAGS=--std=c++17 --gpu-architecture=sm_60 -lineinfo --maxrregcount=63
NVCCFLAGS_JETSONXAVIER=--gpu-architecture=sm_72 -lineinfo --maxrregcount=63
INCLUDE_DIRS=-Isource -I/usr/local/cuda/include
RM=rm -f
DBG_CFLAGS=-Og -g -ggdb
OPT_CFLAGS=-O3 -DNDEBUG
DBG_NVCCFLAGS=--compiler-options "$(CFLAGS) $(DBG_CFLAGS)" --linker-options "$(LDFLAGS)" -g
OPT_NVCCFLAGS=--compiler-options "$(CFLAGS) $(OPT_CFLAGS)" --linker-options "$(LDFLAGS)" -O3 -DNDEBUG
.PHONY: clean
## Targets for Desktop
plugin.dbg.so: hologram.dbg.o source/generateHologram.cu
$(NVCC) $(NVCCFLAGS) $(DBG_NVCCFLAGS) -DILLIXR_INTEGRATION $^ -shared -o $@
plugin.opt.so: hologram.opt.o source/generateHologram.cu
$(NVCC) $(NVCCFLAGS) $(OPT_NVCCFLAGS) -DILLIXR_INTEGRATION $^ -shared -o $@
hologram.dbg.exe: source/testMain.cu source/generateHologram.cu
$(NVCC) $(NVCCFLAGS) $(DBG_NVCCFLAGS) $^ -o $@
hologram.opt.exe: source/testMain.cu source/generateHologram.cu
$(NVCC) $(NVCCFLAGS) $(OPT_NVCCFLAGS) $^ -o $@
hologram.dbg.o: hologram.cpp
$(CXX) $(CXXFLAGS) $(DBG_CFLAGS) $(INCLUDE_DIRS) -c $^ -o $@
hologram.opt.o: hologram.cpp
$(CXX) $(CXXFLAGS) $(OPT_CFLAGS) $(INCLUDE_DIRS) -c $^ -o $@
## Targets for Jetson Xavier
plugin.jetson.dbg.so: hologram.jetson.dbg.o source/generateHologram.cu
$(NVCC) $(NVCCFLAGS_JETSONXAVIER) $(DBG_NVCCFLAGS) -DILLIXR_INTEGRATION $^ -shared -o $@
plugin.jetson.opt.so: hologram.jetson.opt.o source/generateHologram.cu
$(NVCC) $(NVCCFLAGS_JETSONXAVIER) $(OPT_NVCCFLAGS) -DILLIXR_INTEGRATION $^ -shared -o $@
hologram.jetson.dbg.exe: source/testMain.cu source/generateHologram.cu
$(NVCC) $(NVCCFLAGS_JETSONXAVIER) $(DBG_NVCCFLAGS) $^ -o $@
hologram.jetson.opt.exe: source/testMain.cu source/generateHologram.cu
$(NVCC) $(NVCCFLAGS_JETSONXAVIER) $(OPT_NVCCFLAGS) $^ -o $@
hologram.jetson.dbg.o: hologram.cpp
$(CXX) $(CXXFLAGS) $(DBG_CFLAGS) $(INCLUDE_DIRS) -c $^ -o $@
hologram.jetson.opt.o: hologram.cpp
$(CXX) $(CXXFLAGS) $(OPT_CFLAGS) $(INCLUDE_DIRS) -c $^ -o $@
tests/run:
clean:
$(RM) *.so *.exe *.o