Mercurial Hosting > traffic-intelligence
annotate c/Makefile @ 610:0dc36203973d
remove dublicated code for collision/crossing computations
author | MohamedGomaa |
---|---|
date | Wed, 03 Dec 2014 22:57:08 -0500 |
parents | 84690dfe5560 |
children | 34111db7cecb |
rev | line source |
---|---|
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
1 EXE_DIR=../bin |
88
626560624d55
added the simple script to create directories
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
84
diff
changeset
|
2 SCRIPTS_DIR=../scripts |
607 | 3 TRAJECTORYMANAGEMENT_DIR=D:/00-trackingSoftware/trajectories-trajectorymanagementandanalysis/trunk/src/TrajectoryManagementAndAnalysis |
4
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
4 |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
5 CXX = g++ |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
6 |
133
63dd4355b6d1
saving of feature positions in sqlite database
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
129
diff
changeset
|
7 INCLUDE = -I../include -I$(TRAJECTORYMANAGEMENT_DIR) |
9 | 8 |
133
63dd4355b6d1
saving of feature positions in sqlite database
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
129
diff
changeset
|
9 LIBS = -L../../klt -L$(TRAJECTORYMANAGEMENT_DIR) |
70
a52653dca25d
got track features to compile, updated paths to headers and libraries for OpenCV 2
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
18
diff
changeset
|
10 |
4
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
11 LDFLAGS = -lm |
133
63dd4355b6d1
saving of feature positions in sqlite database
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
129
diff
changeset
|
12 LDFLAGS += -lTrajectoryManagementAndAnalysis -lsqlite3 |
401
b829ebdc18e6
simplified input of directories of video frames (simply use the video filename parameter to point at the directory)
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
400
diff
changeset
|
13 LDFLAGS += -lboost_program_options -lboost_filesystem -lboost_system |
70
a52653dca25d
got track features to compile, updated paths to headers and libraries for OpenCV 2
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
18
diff
changeset
|
14 #LDFLAGS += -lfltk |
4
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
15 |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
16 CFLAGS = -Wall -W -Wextra |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
17 UNAME = $(shell uname) |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
18 |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
19 ifneq ($(OPENCV), 0) |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
20 CFLAGS += -DUSE_OPENCV |
193
a728fce85881
simple test of adding and using default HoG pedestrian detector
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
170
diff
changeset
|
21 LDFLAGS += -lopencv_highgui -lopencv_core -lopencv_video -lopencv_ml -lopencv_features2d -lopencv_imgproc -lopencv_objdetect |
4
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
22 endif |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
23 |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
24 ifeq ($(UNAME), Linux) |
70
a52653dca25d
got track features to compile, updated paths to headers and libraries for OpenCV 2
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
18
diff
changeset
|
25 OPENCV_HOME=/usr/local |
119
45a426552aaa
compilation of very simple feature class with trajectory
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
88
diff
changeset
|
26 INCLUDE+= -I$(OPENCV_HOME)/include -I$(OPENCV_HOME)/include/opencv |
70
a52653dca25d
got track features to compile, updated paths to headers and libraries for OpenCV 2
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
18
diff
changeset
|
27 LIBS += -L$(OPENCV_HOME)/lib |
200
0a27fa343257
added one test and cleaned the first and last instant mess
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
196
diff
changeset
|
28 LINUX_BOOST_PREFIX = /usr/local |
4
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
29 CFLAGS += -DLINUX |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
30 EXE_EXTENSION='' |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
31 else # windows |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
32 MINGW_HOME = 'C:\MinGW' |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
33 LDFLAGS += -mconsole -mwindows -lole32 -lwsock32 -luuid |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
34 EXE_EXTENSION='.exe' |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
35 endif |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
36 |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
37 ifeq ($(DEBUG), 1) |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
38 CFLAGS += -g -gstabs+ -DDEBUG |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
39 else |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
40 CFLAGS += -O3 --fast-math |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
41 CFLAGS += -DNDEBUG |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
42 endif |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
43 |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
44 ifeq ($(PROFILING), 1) |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
45 CFLAGS += -pg |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
46 endif |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
47 |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
48 CXXFLAGS = $(INCLUDE) $(CFLAGS) |
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
49 |
10
068cf45c3f1b
added optical flow skeleton (test to reach a frame with cvqueryframe (fast for small resolutions)
Nicolas Saunier <nico@confins.net>
parents:
9
diff
changeset
|
50 #GUI_OBJS = |
400
7ef1071e3cc3
clean up of input classes for list of images and video files
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
220
diff
changeset
|
51 CV_OBJS = cvutils.o InputFrameListModule.o InputVideoFileModule.o |
196
aeab0b88c9b6
began testing of FeatureGraph
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
195
diff
changeset
|
52 COMMON_OBJS = utils.o Motion.o Parameters.o utils.o |
10
068cf45c3f1b
added optical flow skeleton (test to reach a frame with cvqueryframe (fast for small resolutions)
Nicolas Saunier <nico@confins.net>
parents:
9
diff
changeset
|
53 OBJS = $(COMMON_OBJS) $(CV_OBJS) |
196
aeab0b88c9b6
began testing of FeatureGraph
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
195
diff
changeset
|
54 TESTS_OBJS = test_feature.o test_graph.o |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
55 |
10
068cf45c3f1b
added optical flow skeleton (test to reach a frame with cvqueryframe (fast for small resolutions)
Nicolas Saunier <nico@confins.net>
parents:
9
diff
changeset
|
56 |
13
30559b2cf7a9
minimal code to load UBC data
Nicolas Saunier <nico@confins.net>
parents:
10
diff
changeset
|
57 default: builddir all |
4
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
58 |
18
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
59 all: test-pixels optical-flow track-features |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
60 |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
61 builddir: |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
62 @$(SCRIPTS_DIR)/createdirectory.sh $(EXE_DIR) |
4
6509f5b1d795
updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
Nicolas Saunier <nico@confins.net>
parents:
diff
changeset
|
63 |
119
45a426552aaa
compilation of very simple feature class with trajectory
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
88
diff
changeset
|
64 test: |
45a426552aaa
compilation of very simple feature class with trajectory
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
88
diff
changeset
|
65 echo "coucou $(HOME)" |
45a426552aaa
compilation of very simple feature class with trajectory
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
88
diff
changeset
|
66 |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
67 tests: $(TESTS_OBJS) $(OBJS) |
220
f0f800b95765
switched to Catch for the tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
200
diff
changeset
|
68 @$(SCRIPTS_DIR)/createdirectory.sh $(EXE_DIR) |
f0f800b95765
switched to Catch for the tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
200
diff
changeset
|
69 @$(SCRIPTS_DIR)/createdirectory.sh test_data |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
70 $(CXX) $(CFLAGS) $(LIBS) -o $(EXE_DIR)/$@ $^ $(LDFLAGS) |
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
71 $(EXE_DIR)/$@ |
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
72 |
196
aeab0b88c9b6
began testing of FeatureGraph
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
195
diff
changeset
|
73 feature-based-tracking: feature-based-tracking.o $(OBJS) |
415
27f14b99f5a8
added creation of bin directory
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
401
diff
changeset
|
74 @$(SCRIPTS_DIR)/createdirectory.sh $(EXE_DIR) |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
75 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(EXE_DIR)/$@ $(LDFLAGS) |
119
45a426552aaa
compilation of very simple feature class with trajectory
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
88
diff
changeset
|
76 |
18
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
77 track-features.o: track-features.cpp |
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
78 $(CXX) -I../../klt $(INCLUDE) $^ -c |
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
79 |
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
80 track-features: track-features.o $(OBJS) |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
81 $(CXX) $(CFLAGS) $(LIBS) -L../../klt $^ -o $(EXE_DIR)/$@ $(LDFLAGS) -lklt |
18
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
82 |
10
068cf45c3f1b
added optical flow skeleton (test to reach a frame with cvqueryframe (fast for small resolutions)
Nicolas Saunier <nico@confins.net>
parents:
9
diff
changeset
|
83 optical-flow: optical-flow.o $(OBJS) |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
84 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(EXE_DIR)/$@ $(LDFLAGS) |
10
068cf45c3f1b
added optical flow skeleton (test to reach a frame with cvqueryframe (fast for small resolutions)
Nicolas Saunier <nico@confins.net>
parents:
9
diff
changeset
|
85 |
068cf45c3f1b
added optical flow skeleton (test to reach a frame with cvqueryframe (fast for small resolutions)
Nicolas Saunier <nico@confins.net>
parents:
9
diff
changeset
|
86 test-pixels: test-pixels.o $(OBJS) |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
87 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(EXE_DIR)/$@ $(LDFLAGS) |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
88 |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
89 clean: |
162
61fd5aff418c
added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
144
diff
changeset
|
90 rm -f *.gch */*.o *.o *.a $(EXE_DIR)/* |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
91 # $(DISTFILE_OUTPUT) |