#============================================================================# # 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 = -Wall -g -DDEBUG else # Optimized compilation # CXXFLAGS = -Wall -g -O3 -pg --coverage CXXFLAGS = -Wall -g -O3 endif LDFLAGS = -L/usr/X11R6/lib/ 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 \ xfig_tracer.o \ polygon.o \ map.o \ task.o \ retina.o \ manipulator.o \ approximer.o \ intelligence.o $(CXX) -lX11 $(CXXFLAGS) -o $@ $^ $(LDFLAGS) art: art.o misc.o simple_window.o universe.o polygon.o map.o \ task.o retina.o manipulator.o approximer.o intelligence.o $(CXX) -lX11 $(CXXFLAGS) -o $@ $^ $(LDFLAGS) %.task: %.cc misc.o universe.o polygon.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