#########################################################################
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the version 3 of the GNU General Public License #
# as published by the Free Software Foundation. #
# #
# This program is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
# General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see . #
# #
# Written by Francois Fleuret #
# Copyright (C) Idiap Research Institute #
# Contact for comments & bug reports #
#########################################################################
ifeq ($(STATIC),yes)
LDFLAGS=-static -lm
else
LDFLAGS=-lm
endif
ifeq ($(DEBUG),yes)
OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
else
OPTIMIZE_FLAG = -ggdb3 -O3
endif
ifeq ($(PROFILE),yes)
PROFILE_FLAG = -pg
endif
CXXFLAGS = -Wall $(OPTIMIZE_FLAG) $(PROFILE_FLAG)
all: mtp random-graph
TAGS: *.cc *.h
etags --members -l c++ *.cc *.h
random-graph: \
random-graph.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
mtp: \
mtp_graph.o \
tracker.o \
mtp.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
Makefile.depend: *.h *.cc Makefile
$(CC) $(CXXFLAGS) -M *.cc > Makefile.depend
clean:
\rm -f mtp *.o Makefile.depend TAGS
-include Makefile.depend