]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
Add Makefile that compiles all the available variants
authorMichal Sojka <michal.sojka@cvut.cz>
Thu, 22 Feb 2018 14:46:17 +0000 (15:46 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 22 Feb 2018 14:46:17 +0000 (15:46 +0100)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..9ace185
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+# Makefile to build all the available variants
+
+BUILDS = opencvfft-st opencvfft-async fftw fftw-parallel fftw_openmp opencv-cufft
+
+all: $(foreach build,$(BUILDS),build-$(build)/kcf_vot)
+
+CMAKE_OTPS_opencvfft-st    =
+CMAKE_OTPS_opencvfft-async = -DASYNC=ON
+CMAKE_OTPS_opencv-cufft    = -DOPENCV_CUFFT=ON
+CMAKE_OTPS_fftw            = -DFFTW=ON
+CMAKE_OTPS_fftw-parallel   = -DFFTW=ON -DFFTW_PARALLEL=ON
+CMAKE_OTPS_fftw_openmp     = -D=FFTW=ON -DFFTW_OPENMP=ON
+
+
+build-%/kcf_vot: $(shell git ls-files)
+       mkdir -p $(@D)
+       cd $(@D) && cmake $(CMAKE_OTPS_$*) ..
+       cmake --build $(@D)
+
+clean:
+       rm -rf $(BUILDS:%=build-%)