#============================================================================# # This program is free software; you can redistribute it and/or # # modify it under the terms of the GNU General Public License # # version 2 as published by the Free Software Foundation. # # # # This program is distributed in the hope that it will be useful, but # # WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # # General Public License for more details. # # # # Written and (C) by François Fleuret # # Contact for comments & bug reports # #============================================================================# # CXX=g++-3.3 ifeq ($(DEBUG),yes) CXXFLAGS = -fPIC -Wall -g -DDEBUG else # Optimized compilation # CXXFLAGS = -Wall -g -O3 -pg --coverage CXXFLAGS = -fPIC -Wall -g -O3 endif LDFLAGS = -L/usr/X11R6/lib/ -lz -ldl TASK_SRC = dummy.cc move_square.cc hit_shape.cc TASK_OBJ = $(TASK_SRC:.cc=.task) all: main TAGS $(TASK_OBJ) TAGS: *.cc *.h etags *.cc *.h main: main.o misc.o \ simple_window.o \ universe.o \ polygon.o \ xfig_tracer.o \ map.o \ task.o \ retina.o \ manipulator.o \ approximer.o \ intelligence.o $(CXX) $(CXXFLAGS) $(LDFLAGS) -lX11 -o $@ $^ %.task: %.cc misc.o universe.o polygon.o xfig_tracer.o map.o task.o manipulator.o $(CXX) $(CXXFLAGS) -shared -Wl,-soname,$@ -o $@ $^ Makefile.depend: *.h *.cc Makefile $(CC) -M *.cc > Makefile.depend clean: \rm main *.o *.task Makefile.depend -include Makefile.depend