automatic commit
[mlp.git] / Makefile
1
2 #  mlp-mnist is an implementation of a multi-layer neural network.
3 #
4 #  Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/
5 #  Written by Francois Fleuret <francois.fleuret@idiap.ch>
6 #
7 #  This file is part of mlp-mnist.
8 #
9 #  mlp-mnist is free software: you can redistribute it and/or modify
10 #  it under the terms of the GNU General Public License version 3 as
11 #  published by the Free Software Foundation.
12 #
13 #  mlp-mnist is distributed in the hope that it will be useful, but
14 #  WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 #  General Public License for more details.
17 #
18 #  You should have received a copy of the GNU General Public License
19 #  along with mlp-mnist.  If not, see <http://www.gnu.org/licenses/>.
20
21 ifeq ($(DEBUG),yes)
22  CXXFLAGS = -Wall -g
23 else
24  # Optimized compilation
25  CXXFLAGS = -Wall -ffast-math -fcaller-saves -finline-functions -funroll-all-loops -O3
26 endif
27
28 all: ann
29
30 ann: ann.o misc.o images.o neural.o
31         $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
32
33 Makefile.depend: *.h *.cc Makefile
34         $(CC) -M *.cc > Makefile.depend
35
36 clean:
37         \rm ann *.o Makefile.depend
38
39 archive:
40         cd .. ; tar zcvf mlp-mnist.tgz mlp-mnist/{*.{cc,h,txt,sh},Makefile}
41
42 -include Makefile.depend