Renaming.
[flatland.git] / Makefile
1
2 #
3 #  flatland is a simple 2d physical simulator
4 #
5 #  Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/
6 #  Written by Francois Fleuret <francois.fleuret@idiap.ch>
7 #
8 #  This file is part of flatland
9 #
10 #  flatland 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 #  flatland is distributed in the hope that it will be useful, but
15 #  WITHOUT ANY WARRANTY; without even the implied warranty of
16 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 #  General Public License for more details.
18 #
19 #  You should have received a copy of the GNU General Public License
20 #  along with flatland.  If not, see <http://www.gnu.org/licenses/>.
21 #
22
23 ifeq ($(DEBUG),yes)
24  CXXFLAGS = -fPIC -Wall -g -DDEBUG
25 else
26  CXXFLAGS = -fPIC -Wall -g -O3
27 endif
28
29 CXXFLAGS += -I/usr/include/cairo -DCAIRO_SUPPORT
30
31 LDFLAGS += -lcairo
32
33 all: flatland TAGS
34
35 TAGS: *.cc *.h
36         etags *.cc *.h
37
38 flatland: libflatland.so
39         ./build.py
40
41 libflatland.so: \
42         sequence_generator.o misc.o \
43         polygon.o universe.o \
44         canvas.o canvas_cairo.o
45         $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC -o $@ $^
46
47 Makefile.depend: *.h *.cc Makefile
48         $(CC) $(CXXFLAGS) -M *.cc > Makefile.depend
49
50 clean:
51         \rm -rf flatland *.o *.so Makefile.depend
52
53 -include Makefile.depend