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