-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
36 lines (27 loc) · 1.37 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
.PHONY: clean
CC = g++
WINLIB = -lgdi32 #-mwindows
CFLAGS = -g #-Wall
#SRCS = main.cpp
PROG = main.exe
OPENCV_include_path = C:\opencv\build\include
OPENCV_dll_path = C:\opencv\build\x64\MinGW\bin
OPENCV_dll = -l libopencv_calib3d412 -l libopencv_core412 -l libopencv_dnn412 -l libopencv_features2d412 -l libopencv_flann412 -l libopencv_gapi412 -l libopencv_highgui412 -l libopencv_imgcodecs412 -l libopencv_imgproc412 -l libopencv_ml412 -l libopencv_objdetect412 -l libopencv_photo412 -l libopencv_stitching412 -l libopencv_video412 -l libopencv_videoio412
#main file
all: main.o capture_img.o img_to_2D_array.o search_algorithm.o
@$(CC) -o $(PROG) $(CFLAGS) main.o capture_img.o img_to_2D_array.o search_algorithm.o $(WINLIB) -I $(OPENCV_include_path) -L $(OPENCV_dll_path) $(OPENCV_dll)
echo "compile all file"
mouse:
@$(CC) -o mouse mouse.cpp -I $(OPENCV_include_path) -L $(OPENCV_dll_path) $(OPENCV_dll)
#objects
main.o: main.cpp
@g++ -c main.cpp -I $(OPENCV_include_path) -L $(OPENCV_dll_path) $(OPENCV_dll)
capture_img.o: capture_img.cpp capture_img.h
@g++ -c capture_img.cpp
img_to_2D_array.o: img_to_2D_array.cpp img_to_2D_array.h
@g++ -c img_to_2D_array.cpp -I $(OPENCV_include_path) -L $(OPENCV_dll_path) $(OPENCV_dll)
search_algorithm.o: search_algorithm.cpp search_algorithm.h
@g++ -c search_algorithm.cpp
clean:
del *.exe
del *.o