2 #============================================================================#
3 # This program is free software; you can redistribute it and/or #
4 # modify it under the terms of the GNU General Public License #
5 # version 2 as published by the Free Software Foundation. #
7 # This program is distributed in the hope that it will be useful, but #
8 # WITHOUT ANY WARRANTY; without even the implied warranty of #
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
10 # General Public License for more details. #
12 # Written and (C) by François Fleuret #
13 # Contact <francois.fleuret@epfl.ch> for comments & bug reports #
14 #============================================================================#
17 CXXFLAGS = -fPIC -Wall -g -DDEBUG
19 # Optimized compilation
20 # CXXFLAGS = -Wall -g -O3 -pg --coverage
21 CXXFLAGS = -fPIC -Wall -g -O3
27 CXXFLAGS += -DX11_SUPPORT
28 LDFLAGS += -L/usr/lib/x86_64-linux-gnu/
31 CXXFLAGS += -I/usr/include/cairo -DCAIRO_SUPPORT
34 TASK_SRC = dummy.cc move_square.cc hit_shape.cc
35 TASK_OBJ = $(TASK_SRC:.cc=.so)
37 all: main TAGS $(TASK_OBJ)
47 canvas.o canvas_cairo.o \
53 $(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -lX11 -o $@
55 %.so: %.cc misc.o universe.o polygon.o map.o task.o manipulator.o
56 $(CXX) $(CXXFLAGS) -shared -Wl,-soname,$@ -o $@ $^
58 Makefile.depend: *.h *.cc Makefile
59 $(CC) $(CXXFLAGS) -M *.cc > Makefile.depend
62 \rm -f main *.o *.so Makefile.depend
64 -include Makefile.depend