]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blob - Makefile
Big Batch mode now support OpenMP
[hercules2020/kcf.git] / Makefile
1 # Makefile to build all the available variants
2
3 BUILDS = opencvfft-st opencvfft-async opencvfft-openmp fftw fftw-async fftw-openmp fftw-big fftw-big-openmp cufftw cufftw-big cufftw-big-openmp cufft cufft-openmp cufft-big cufft-big-openmp
4
5 all: $(foreach build,$(BUILDS),build-$(build)/kcf_vot)
6
7 CMAKE_OPTS += -G Ninja
8 #CMAKE_OPTS += -DOpenCV_DIR=~/opt/opencv-2.4/share/OpenCV
9
10 CMAKE_OTPS_opencvfft-st      = -DFFT=OpenCV
11 CMAKE_OTPS_opencvfft-async   = -DFFT=OpenCV -DASYNC=ON
12 CMAKE_OTPS_opencvfft-openmp  = -DFFT=OpenCV -DOPENMP=ON
13 CMAKE_OTPS_fftw              = -DFFT=fftw
14 CMAKE_OTPS_fftw-openmp       = -DFFT=fftw -DOPENMP=ON
15 CMAKE_OTPS_fftw-async        = -DFFT=fftw -DASYNC=ON
16 CMAKE_OTPS_fftw-big          = -DFFT=fftw -DBIG_BATCH=ON
17 CMAKE_OTPS_fftw-big-openmp   = -DFFT=fftw -DBIG_BATCH=ON -DOPENMP=ON
18 CMAKE_OTPS_cufftw            = -DFFT=cuFFTW
19 CMAKE_OTPS_cufftw-big        = -DFFT=cuFFTW -DBIG_BATCH=ON
20 CMAKE_OTPS_cufftw-big-openmp = -DFFT=cuFFTW -DBIG_BATCH=ON -DOPENMP=ON
21 CMAKE_OTPS_cufft             = -DFFT=cuFFT
22 CMAKE_OTPS_cufft-openmp      = -DFFT=cuFFT -DOPENMP=ON
23 CMAKE_OTPS_cufft-big         = -DFFT=cuFFT -DBIG_BATCH=ON
24 CMAKE_OTPS_cufft-big-openmp  = -DFFT=cuFFT -DBIG_BATCH=ON -DOPENMP=ON
25
26 .SECONDARY: $(BUILDS:%=build-%/build.ninja)
27
28 build-%/build.ninja:
29         mkdir -p $(@D)
30         cd $(@D) && cmake $(CMAKE_OPTS) $(CMAKE_OTPS_$*) ..
31
32 .PHONY: FORCE
33 build-%/kcf_vot: build-%/build.ninja FORCE
34         cmake --build $(@D)
35
36 $(BUILDS): %: build-%/kcf_vot
37
38 clean:
39         rm -rf $(BUILDS:%=build-%)