Mercurial > hg > nsaunier > traffic-intelligence
annotate c/Makefile @ 72:575340e6fce3
corrected most of the method to load NGSIM data (adapted to the current MovingObject class
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 14 Jan 2011 19:49:20 -0500 |
| parents | a52653dca25d |
| children | 731df2fa0010 |
| rev | line source |
|---|---|
|
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
|
1 BUILD_DIR=../bin |
|
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
|
2 |
|
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
|
3 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
|
4 |
| 9 | 5 INCLUDE = -I../include |
| 6 | |
|
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
|
7 LIBS = -L../../klt |
|
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
|
8 |
|
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
|
9 LDFLAGS = -lm |
|
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 #LDFLAGS += -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_unit_test_framework-mt |
|
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
|
11 #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
|
12 |
|
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
|
13 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
|
14 # -DUSE_OPENCV |
|
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 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
|
16 |
|
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 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
|
18 CFLAGS += -DUSE_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
|
19 LDFLAGS += -lopencv_highgui -lopencv_core -lopencv_ml |
|
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
|
20 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
|
21 |
|
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 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
|
23 OPENCV_HOME=/usr/local |
|
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
|
24 INCLUDE+= -I$(OPENCV_HOME)/include/ |
|
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 LIBS += -L$(OPENCV_HOME)/lib |
|
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
26 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
|
27 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
|
28 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
|
29 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
|
30 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
|
31 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
|
32 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
|
33 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
|
34 |
|
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 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
|
36 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
|
37 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
|
38 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
|
39 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
|
40 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
|
41 |
|
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 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
|
43 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
|
44 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
|
45 |
|
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 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
|
47 |
|
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
|
48 #GUI_OBJS = |
|
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
|
49 CV_OBJS = cvutils.o |
|
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
|
50 COMMON_OBJS = 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
|
51 OBJS = $(COMMON_OBJS) $(CV_OBJS) |
|
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
|
52 #TESTS_OBJS = |
|
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 |
|
13
30559b2cf7a9
minimal code to load UBC data
Nicolas Saunier <nico@confins.net>
parents:
10
diff
changeset
|
54 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
|
55 |
|
18
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
56 all: test-pixels optical-flow track-features |
|
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
57 |
|
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
58 builddir: |
|
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
|
59 @createdirectory.sh $(BUILD_DIR) |
|
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
|
60 |
|
18
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
61 track-features.o: track-features.cpp |
|
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
62 $(CXX) -I../../klt $(INCLUDE) $^ -c |
|
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
63 |
|
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
64 track-features: track-features.o $(OBJS) |
|
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
65 $(CXX) $(CFLAGS) $(LIBS) -L../../klt $^ -o $(BUILD_DIR)/$@ $(LDFLAGS) -lklt |
|
ef35d5f111e4
incorporated code to use KLT
Nicolas Saunier <nico@confins.net>
parents:
13
diff
changeset
|
66 |
|
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
|
67 optical-flow: optical-flow.o $(OBJS) |
|
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
|
68 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/$@ $(LDFLAGS) |
|
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
|
69 |
|
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
|
70 test-pixels: test-pixels.o $(OBJS) |
|
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
|
71 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/$@ $(LDFLAGS) |
|
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
72 |
|
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
73 clean: |
|
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
74 rm -f *.gch */*.o *.o *.a $(BUILD_DIR)/* |
|
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
75 # $(DISTFILE_OUTPUT) |
