X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=6fc991db81ce03d77e07df892dee369482fea375;hb=ea2a7fd04689794d3fb266e2b73bedb10953abb4;hp=10669ed547e401b382e5fd1bc9073e88780ebf8a;hpb=ba46b057f3e2613a86f2dea7fa8022990482c735;p=universe.git diff --git a/Makefile b/Makefile index 10669ed..6fc991d 100644 --- a/Makefile +++ b/Makefile @@ -16,14 +16,18 @@ # CXX=g++-3.3 ifeq ($(DEBUG),yes) - CXXFLAGS = -Wall -g -DDEBUG + CXXFLAGS = -fPIC -Wall -g -DDEBUG else # Optimized compilation # CXXFLAGS = -Wall -g -O3 -pg --coverage - CXXFLAGS = -Wall -g -O3 + CXXFLAGS = -fPIC -Wall -g -O3 endif -LDFLAGS = -L/usr/X11R6/lib/ +LDFLAGS = -L/usr/X11R6/lib/ -lz -ldl + +# Do we use cairo? +CXXFLAGS += -I/usr/include/cairo -DCAIRO_SUPPORT +LDFLAGS += -lcairo TASK_SRC = dummy.cc move_square.cc hit_shape.cc TASK_OBJ = $(TASK_SRC:.cc=.task) @@ -33,17 +37,26 @@ all: main TAGS $(TASK_OBJ) TAGS: *.cc *.h etags *.cc *.h -main: main.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 +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 + \rm -f main *.o *.task Makefile.depend -include Makefile.depend