forked from PetteriAimonen/focus-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.windows
64 lines (54 loc) · 2.21 KB
/
Makefile.windows
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
63
64
# This Makefile is for building focus-stack on Windows x64
# using Visual C++ and nmake. Install Build Tools for Visual
# Studio 2019 and open the build tools command prompt.
# Also extract OpenCV 4 Windows x64 binary package.
# By default this makefile expects that OpenCV is in path
# ..\opencv\build, but that can be edited below.
#
# Finally, type nmake -f Makefile.windows
CXX = cl
CXXFLAGS = /O2 /EHsc /W2 /D_USE_MATH_DEFINES /Zi
# Path to OpenCV, you may need to edit these if your version is different
# They can also be set on nmake command line.
OPENCV_PATH = ..\opencv\build
OPENCV_INC = $(OPENCV_PATH)\include
OPENCV_LIB = $(OPENCV_PATH)\x64\vc14\lib\opencv_world430.lib
OPENCV_DLL = $(OPENCV_PATH)\x64\vc14\bin\opencv_world430.dll
CXXFLAGS = $(CXXFLAGS) /I$(OPENCV_INC)
LDFLAGS = $(OPENCV_LIB)
!IF [git describe --always --dirty > gitrev] == 0
GIT_VERSION = \
!INCLUDE gitrev
CXXFLAGS = $(CXXFLAGS) "/DGIT_VERSION=\"$(GIT_VERSION)\""
!ENDIF
# Expand glob patterns in arguments automatically
LDFLAGS = $(LDFLAGS) /link setargv.obj
# List of source code files
CXXSRCS = src/focusstack.cc src/worker.cc src/logger.cc src/options.cc \
src/radialfilter.cc src/histogrampercentile.cc \
src/task_3dpreview.cc \
src/task_align.cc src/task_background_removal.cc src/task_denoise.cc \
src/task_depthmap.cc src/task_depthmap_inpaint.cc src/task_focusmeasure.cc \
src/task_grayscale.cc src/task_loadimg.cc \
src/task_merge.cc src/task_reassign.cc src/task_saveimg.cc \
src/task_wavelet.cc src/task_wavelet_opencl.cc \
src/main.cc
all: build build/focus-stack.exe
package: build/focus-stack.exe
del /S /q distrib || echo.
mkdir distrib || echo.
mkdir distrib\focus-stack || echo.
copy /Y build\focus-stack.exe distrib\focus-stack
copy /Y build\*.dll distrib\focus-stack
xcopy /E examples distrib\focus-stack
copy /Y README.md distrib\focus-stack\README.txt
copy /Y LICENSE.md distrib\focus-stack\LICENSE.txt
copy /Y docs\focus-stack.html distrib\focus-stack\focus-stack.html
powershell cd distrib; Compress-Archive focus-stack focus-stack_Windows.zip
build:
mkdir build
clean:
del /S /q build
build/focus-stack.exe: $(CXXSRCS)
$(CXX) $(CXXFLAGS) /Fe:$@ $** $(LDFLAGS)
copy $(OPENCV_DLL) build