Mercurial Hosting > traffic-intelligence
comparison c/Makefile @ 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
author | Nicolas Saunier <nico@confins.net> |
---|---|
date | Fri, 23 Oct 2009 00:26:47 -0400 |
parents | |
children | 59b7e3954178 |
comparison
equal
deleted
inserted
replaced
3:ace29ecfb846 | 4:6509f5b1d795 |
---|---|
1 BUILD_DIR=../bin | |
2 | |
3 CXX = g++ | |
4 | |
5 LDFLAGS = -lm | |
6 LDFLAGS += -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_unit_test_framework-mt | |
7 LDFLAGS += -lfltk | |
8 | |
9 CFLAGS = -Wall -W -Wextra | |
10 # -DUSE_OPENCV | |
11 UNAME = $(shell uname) | |
12 | |
13 ifneq ($(OPENCV), 0) | |
14 CFLAGS += -DUSE_OPENCV | |
15 LDFLAGS += -lhighgui -lcxcore -lcv -lml | |
16 endif | |
17 | |
18 ifeq ($(UNAME), Linux) | |
19 LINUX_BOOST_PREFIX = /usr/local | |
20 CFLAGS += -DLINUX | |
21 EXE_EXTENSION='' | |
22 else # windows | |
23 MINGW_HOME = 'C:\MinGW' | |
24 LDFLAGS += -mconsole -mwindows -lole32 -lwsock32 -luuid | |
25 EXE_EXTENSION='.exe' | |
26 endif | |
27 | |
28 ifeq ($(DEBUG), 1) | |
29 CFLAGS += -g -gstabs+ -DDEBUG | |
30 else | |
31 CFLAGS += -O3 --fast-math | |
32 CFLAGS += -DNDEBUG | |
33 endif | |
34 | |
35 ifeq ($(PROFILING), 1) | |
36 CFLAGS += -pg | |
37 endif | |
38 | |
39 CXXFLAGS = $(INCLUDE) $(CFLAGS) | |
40 | |
41 | |
42 default: main.o | |
43 # @echo "default" | |
44 @createdirectory.sh $(BUILD_DIR) | |
45 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/test-pixels $(LDFLAGS) | |
46 | |
47 # $(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/$@ $(LDFLAGS) |