Oups, some renaming of variables was a bit too brutal. Fixed.
[mtp.git] / Makefile
1
2 # mtp is the ``Multi Tracked Paths'', an implementation of the
3 # k-shortest paths algorithm for multi-target tracking.
4 #
5 # Copyright (c) 2012 Idiap Research Institute, http://www.idiap.ch/
6 # Written by Francois Fleuret <francois.fleuret@idiap.ch>
7 #
8 # This file is part of mtp.
9 #
10 # mtp is free software: you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License version 3 as
12 # published by the Free Software Foundation.
13 #
14 # mtp is distributed in the hope that it will be useful, but WITHOUT
15 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17 # License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with selector.  If not, see <http://www.gnu.org/licenses/>.
21
22 ifeq ($(STATIC),yes)
23   LDFLAGS=-static -lm
24 else
25   LDFLAGS=-lm
26 endif
27
28 ifeq ($(DEBUG),yes)
29   OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
30 else
31   OPTIMIZE_FLAG = -ggdb3 -O3
32 endif
33
34 ifeq ($(VERBOSE),yes)
35   VERBOSE_FLAG = -DVERBOSE
36 endif
37
38 ifeq ($(PROFILE),yes)
39   PROFILE_FLAG = -pg
40 endif
41
42 CXXFLAGS = -Wall $(OPTIMIZE_FLAG) $(PROFILE_FLAG) $(VERBOSE_FLAG)
43
44 all: mtp mtp_example
45
46 TAGS: *.cc *.h
47         etags --members -l c++ *.cc *.h
48
49 random-graph: \
50         random-graph.o
51         $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
52
53 mtp: \
54         path.o mtp_graph.o \
55         tracker.o \
56         mtp.o
57         $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
58
59 mtp_example: \
60         path.o mtp_graph.o \
61         tracker.o \
62         mtp_example.o
63         $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
64
65 Makefile.depend: *.h *.cc Makefile
66         $(CC) $(CXXFLAGS) -M *.cc > Makefile.depend
67
68 clean:
69         \rm -f mtp mtp_example *.o Makefile.depend TAGS
70
71 -include Makefile.depend