################################################################################
# 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 #
# (C) Ecole Polytechnique Federale de Lausanne #
# Contact for comments & bug reports #
################################################################################
ifeq ($(CXX),)
CXX = g++-2.95
endif
ifeq ($(DEBUG),yes)
LDFLAGS = -lm
CXXFLAGS = -Wall -g -Wall -DDEBUG -DVERBOSE
else
LDFLAGS = -lm
CXXFLAGS = -ffast-math -fcaller-saves -finline-functions -funroll-all-loops -Wall -O3
endif
all: cmim create_samples Makefile.depend
test: all
./test.sh
cmim: misc.o fastentropy.o classifier.o cmim.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
create_samples: create_samples.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
clean:
\rm -f *.o cmim
Makefile.depend: *.h *.cc Makefile
$(CC) -M *.cc > Makefile.depend
ARCHIVE_NAME = cmim-1.1
DIRNAME = cmim-1.1
archive:
cd ..; tar zcvf ${ARCHIVE_NAME}.tgz \
${DIRNAME}/*.{cc,h,sh,txt} ${DIRNAME}/Makefile ${DIRNAME}/README
-include Makefile.depend