forked from ChicoState/SmartCCTV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
212 lines (158 loc) · 8.21 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#############################################################################
# Makefile for building: SmartCCTV_UI
# This is the skeleton makefile of the project.
# It is almost cross-platform except for some of the things which are
# labeled as FIXME (should be highlighted by any decent editor).
# These lines should be replaced by the corresopnding lines from the
# makefile that is generated by the qmake
#
# Instructions:
# 1. run qmake SmartCCTV_UI.pro
# qmake will generate another Makefile
# It's called the system-dependent makefile
# run that command in a different directory to avoid getting this
# Makefile overridden.
#
# 2. Find all places in this skeleton makefile which are labeled as FIXME
# inside the system-dependent makefile generated by qmake and copy
# then over, replacing the corresponding text in the skeleton makefile
#
# 3. run make
# to build the project
# Don't commit your own makefile tailored specifically to your system
# only the skeleton makefile should be in the repo
#############################################################################
MAKEFILE = Makefile
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) -g
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) -std=c++17 -g
# FIXME
# This is the path to the #includes header files of Qt.
# Change this according to the makefile generated when you run qmake.
# When you run qmake it will generate a Makefile. Copy and paste the INCPATH from that, replacing this line.
INCPATH = -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64
LINK = g++ `pkg-config --cflags --libs opencv`
LFLAGS = -Wl,-O1
# FIXME
# These are the installed libraries of Qt.
# Change this according to the makefile generated when you run qmake.
# When you run qmake it will generate a Makefile. Copy and paste the LIBS from that, replacing this line.
LIBS = $(SUBLIBS) -L/usr/X11R6/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
ALL_LIBS = $(LIBS) -lpthread -lrt `pkg-config opencv --cflags --libs`
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
TAR = tar -cf
COMPRESS = gzip -9f
AR = ar cqs
RANLIB =
SED = sed
STRIP = strip
####### Output directory
OBJECTS_DIR = build
BUILD_DIR = build
####### Files
SOURCES_DIR=sources
SOURCES = $(SOURCES_DIR)/camera_daemon.cpp \
$(SOURCES_DIR)/high_level_cctv_daemon_apis.cpp \
$(SOURCES_DIR)/low_level_cctv_daemon_apis.cpp \
$(SOURCES_DIR)/write_message.cpp \
$(SOURCES_DIR)/main.cpp \
$(SOURCES_DIR)/mainwindow.cpp moc_mainwindow.cpp \
$(SOURCES_DIR)/humanFilter.cpp \
$(SOURCES_DIR)/motionFilter.cpp \
$(SOURCES_DIR)/camera.cpp
OBJECTS = $(OBJECTS_DIR)/camera_daemon.o \
$(OBJECTS_DIR)/high_level_cctv_daemon_apis.o \
$(OBJECTS_DIR)/low_level_cctv_daemon_apis.o \
$(OBJECTS_DIR)/write_message.o \
$(OBJECTS_DIR)/main.o \
$(OBJECTS_DIR)/mainwindow.o \
$(OBJECTS_DIR)/moc_mainwindow.o \
$(OBJECTS_DIR)/humanFilter.o \
$(OBJECTS_DIR)/motionFilter.o \
$(OBJECTS_DIR)/camera.o
TARGET = $(OBJECTS_DIR)/SmartCCTV_UI
QT_METACODE = ui_mainwindow.h moc_mainwindow.cpp
first: all
####### Implicit rules
.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
####### Build rules
$(TARGET): ui_mainwindow.h $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(ALL_LIBS)
all: Makefile $(TARGET)
# FIXME
# This is the rule to build the moc_mainwindow.cpp
# This file is a Meta object code generated by Qt compiler from reading C++ file 'mainwindow.h'
# Change this according to the makefile generated when you run qmake.
# When you run qmake it will generate a Makefile. Copy and paste the rule to build the moc_mainwindow.cpp, replacing these lines.
moc_mainwindow.cpp: sources/high_level_cctv_daemon_apis.h \
sources/mainwindow.h
/usr/lib/x86_64-linux-gnu/qt5/bin/moc $(DEFINES) -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/konstantin/Documents/programming/SmartCCTV -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include sources/mainwindow.h -o moc_mainwindow.cpp
# FIXME
# This is the rule to build the ui_mainwindow.h
# This file is a Form generated by Qt compiler from reading UI file 'mainwindow.ui'
# Change this according to the makefile generated when you run qmake.
# When you run qmake it will generate a Makefile. Copy and paste the rule to build the ui_mainwindow.h, replacing these lines.
ui_mainwindow.h: sources/mainwindow.ui
/usr/lib/x86_64-linux-gnu/qt5/bin/uic sources/mainwindow.ui -o ui_mainwindow.h
####### Compile
$(OBJECTS_DIR)/write_message.o: $(SOURCES_DIR)/write_message.cpp $(SOURCES_DIR)/write_message.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $(SOURCES_DIR)/write_message.cpp
$(OBJECTS_DIR)/high_level_cctv_daemon_apis.o: $(SOURCES_DIR)/high_level_cctv_daemon_apis.cpp $(SOURCES_DIR)/high_level_cctv_daemon_apis.h \
$(SOURCES_DIR)/low_level_cctv_daemon_apis.h \
$(SOURCES_DIR)/write_message.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $(SOURCES_DIR)/high_level_cctv_daemon_apis.cpp
$(OBJECTS_DIR)/low_level_cctv_daemon_apis.o: $(SOURCES_DIR)/low_level_cctv_daemon_apis.cpp $(SOURCES_DIR)/low_level_cctv_daemon_apis.h \
$(SOURCES_DIR)/camera_daemon.h \
$(SOURCES_DIR)/write_message.h \
$(SOURCES_DIR)/camera.hpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) `pkg-config --cflags --libs opencv` -static-libstdc++ -o $@ $(SOURCES_DIR)/low_level_cctv_daemon_apis.cpp
$(OBJECTS_DIR)/main.o: $(SOURCES_DIR)/main.cpp $(SOURCES_DIR)/mainwindow.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $(SOURCES_DIR)/main.cpp
$(OBJECTS_DIR)/mainwindow.o: $(SOURCES_DIR)/mainwindow.cpp $(SOURCES_DIR)/mainwindow.h \
ui_mainwindow.h \
$(SOURCES_DIR)/high_level_cctv_daemon_apis.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $(SOURCES_DIR)/mainwindow.cpp
$(OBJECTS_DIR)/moc_mainwindow.o: moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ moc_mainwindow.cpp
$(OBJECTS_DIR)/camera_daemon.o: $(SOURCES_DIR)/camera_daemon.cpp $(SOURCES_DIR)/camera_daemon.h \
$(SOURCES_DIR)/low_level_cctv_daemon_apis.h \
$(SOURCES_DIR)/camera.hpp \
$(SOURCES_DIR)/write_message.h
$(CXX) -c $(CXXFLAGS) -ggdb `pkg-config --cflags --libs opencv` -static-libstdc++ -o $@ $(SOURCES_DIR)/camera_daemon.cpp
$(OBJECTS_DIR)/camera.o: $(SOURCES_DIR)/camera.cpp $(SOURCES_DIR)/camera.hpp \
$(SOURCES_DIR)/humanFilter.hpp \
$(SOURCES_DIR)/low_level_cctv_daemon_apis.h \
$(SOURCES_DIR)/write_message.h
$(CXX) -c $(CXXFLAGS) -ggdb `pkg-config --cflags --libs opencv` -static-libstdc++ -o $@ $(SOURCES_DIR)/camera.cpp
$(OBJECTS_DIR)/motionFilter.o: $(SOURCES_DIR)/motionFilter.cpp $(SOURCES_DIR)/motionFilter.hpp
$(CXX) -c $(CXXFLAGS) -ggdb `pkg-config --cflags --libs opencv` -static-libstdc++ -o $@ $(SOURCES_DIR)/motionFilter.cpp
$(OBJECTS_DIR)/humanFilter.o: $(SOURCES_DIR)/humanFilter.cpp $(SOURCES_DIR)/humanFilter.hpp
$(CXX) -c $(CXXFLAGS) -ggdb `pkg-config --cflags --libs opencv` -static-libstdc++ -o $@ $(SOURCES_DIR)/humanFilter.cpp
clean:
rm $(QT_METACODE) $(OBJECTS) $(TARGET)
####### Install