Mercurial Hosting > traffic-intelligence
annotate c/Makefile @ 8:59b7e3954178
renaming and added make clean
author | Nicolas Saunier <nico@confins.net> |
---|---|
date | Sat, 07 Nov 2009 23:33:51 -0500 |
parents | 6509f5b1d795 |
children | eb38637f338d |
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 |
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 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
|
6 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
|
7 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
|
8 |
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 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
|
10 # -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
|
11 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
|
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 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
|
14 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
|
15 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
|
16 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
|
17 |
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 ifeq ($(UNAME), Linux) |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
19 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
|
20 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
|
21 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
|
22 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
|
23 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
|
24 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
|
25 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
|
26 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
|
27 |
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 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
|
29 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
|
30 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
|
31 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
|
32 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
|
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 ($(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
|
36 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
|
37 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
|
38 |
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 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
|
40 |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
41 default: all 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
|
42 |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
43 all: test-pixels |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
44 |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
45 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
|
46 @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
|
47 |
8
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
48 test-pixels: test-pixels.o |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
49 $(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/test-pixels $(LDFLAGS) |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
50 # $(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/$@ $(LDFLAGS) |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
51 |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
52 clean: |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
53 rm -f *.gch */*.o *.o *.a $(BUILD_DIR)/* |
59b7e3954178
renaming and added make clean
Nicolas Saunier <nico@confins.net>
parents:
4
diff
changeset
|
54 # $(DISTFILE_OUTPUT) |