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 #============================================================================#
19 CXXFLAGS = -Wall -g -DDEBUG
21 # Optimized compilation
22 # CXXFLAGS = -Wall -g -O3 -pg --coverage
23 CXXFLAGS = -Wall -g -O3
26 LDFLAGS = -L/usr/X11R6/lib/
28 TASK_SRC = dummy.cc move_square.cc hit_shape.cc
29 TASK_OBJ = $(TASK_SRC:.cc=.task)
31 all: mash main TAGS $(TASK_OBJ)
47 $(CXX) -lX11 $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
49 mash: misc.o universe.o polygon.o xfig_tracer.o mash.o
50 $(CXX) -lX11 $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
52 %.task: %.cc misc.o universe.o polygon.o xfig_tracer.o map.o task.o manipulator.o
53 $(CXX) $(CXXFLAGS) -shared -Wl,-soname,$@ -o $@ $^
55 Makefile.depend: *.h *.cc Makefile
56 $(CC) -M *.cc > Makefile.depend
59 \rm main *.o *.task Makefile.depend
61 -include Makefile.depend