Mercurial Hosting > traffic-intelligence
annotate c/Makefile @ 13:30559b2cf7a9
minimal code to load UBC data
author | Nicolas Saunier <nico@confins.net> |
---|---|
date | Fri, 13 Nov 2009 19:29:01 -0500 |
parents | 068cf45c3f1b |
children | ef35d5f111e4 |
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 | |
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
|
7 LDFLAGS = -lm |
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
|
8 LDFLAGS += -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_unit_test_framework-mt |
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 += -lfltk |
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
|
10 |
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 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
|
12 # -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
|
13 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
|
14 |
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 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
|
16 CFLAGS += -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
|
17 LDFLAGS += -lhighgui -lcxcore -lcv -lml |
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 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
|
19 |
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 ifeq ($(UNAME), Linux) |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
21 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
|
22 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
|
23 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
|
24 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
|
25 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
|
26 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
|
27 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
|
28 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
|
29 |
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 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
|
31 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
|
32 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
|
33 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
|
34 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
|
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 ($(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
|
38 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
|
39 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
|
40 |
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 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
|
42 |
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
|
43 #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
|
44 CV_OBJS = cvutils.o |
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
|
45 #COMMON_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
|
46 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
|
47 #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
|
48 |
13
30559b2cf7a9
minimal code to load UBC data
Nicolas Saunier <nico@confins.net>
parents:
10
diff
changeset
|
49 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
|
50 |
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 all: test-pixels optical-flow |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
52 |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
53 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
|
54 @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
|
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 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
|
57 $(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
|
58 |
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
|
59 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
|
60 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/$@ $(LDFLAGS) |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
61 |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
62 clean: |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
63 rm -f *.gch */*.o *.o *.a $(BUILD_DIR)/* |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
64 # $(DISTFILE_OUTPUT) |