-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (35 loc) · 1.09 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# This file is part of the Motion_Detection_And_Tracking (MDT) project.
#
# This Source Code Form is subject to the terms of the GNU GENERAL PUBLIC LICENSE,
# v. 3.0. If a copy of the GPL was not distributed with this
# file, You can obtain one at http://www.gnu.org/licenses/gpl-3.0/.
#
CCX = g++ -std=c++11 -w
INCLUDES = -Idatabase -Isrc
LIBRARIES_OPENCV = `pkg-config --cflags --libs opencv`
LIBRARIES = $(LIBRARIES_OPENCV) -pthread -lm -w
SRC := $(shell find -name '*.cpp')
FILE_NAMES_SRC = $(SRC:.cpp=.o)
PROTOS := $(shell find -name '*.cc')
FILE_NAMES_PROTOS = $(PROTOS:.cc=.o)
FILE_NAMES = $(FILE_NAMES_SRC) $(FILE_NAMES_PROTOS)
EXEC = MDT
.cpp.o:
@$(CCX) $(INCLUDES) $(LIBRARIES) -Wall -Wformat -c -o $@ $< -w
.cc.o:
@$(CCX) $(INCLUDES) $(LIBRARIES) -Wall -Wformat -c -o $@ $< -w
all: message_compiling $(EXEC)
@echo Done ...
message_compiling:
@echo Compiling MDT ...
message_cleaning:
@echo Cleaning MDT ...
run:
./$(EXEC)
$(EXEC): $(FILE_NAMES)
@$(CCX) -o $(EXEC) $(FILE_NAMES) $(LIBRARIES) $(INCLUDES)
clean: message_cleaning
@rm $(EXEC) $(FILE_NAMES)
teste:
$(SRC)