-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
35 lines (25 loc) · 1.19 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
current_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
ifeq ($(OS),Windows_NT)
dllend := .dll
fpiccuda :=
fpicamd :=
mvcommand := copy $(subst /,\,"$(current_dir)vship$(dllend)") "%APPDATA%\VapourSynth\plugins64"
else
dllend := .so
fpiccuda := -Xcompiler -fPIC
fpicamd := -fPIC
mvcommand := cp "$(current_dir)vship$(dllend)" /usr/lib/vapoursynth
endif
.FORCE:
build: src/main.cpp .FORCE
hipcc src/main.cpp --offload-arch=native -I "$(current_dir)include" -Wno-unused-result -Wno-ignored-attributes -shared $(fpicamd) -o "$(current_dir)vship$(dllend)"
buildcuda: src/main.cpp .FORCE
nvcc -x cu src/main.cpp -arch=native -I "$(current_dir)include" -shared $(fpiccuda) -o "$(current_dir)vship$(dllend)"
buildcudaall: src/main.cpp .FORCE
nvcc -x cu src/main.cpp -arch=all -I "$(current_dir)include" -shared $(fpiccuda) -o "$(current_dir)vship$(dllend)"
buildall: src/main.cpp .FORCE
hipcc src/main.cpp --offload-arch=gfx1100,gfx1101,gfx1102,gfx1030,gfx1031,gfx1032,gfx906,gfx801,gfx802,gfx803 -I "$(current_dir)include" -Wno-unused-result -Wno-ignored-attributes -shared $(fpicamd) -o "$(current_dir)vship$(dllend)"
install:
$(mvcommand)
test: .FORCE build
vspipe .\test\vsscript.vpy .