projects
/
universe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor cosmetics.
[universe.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
3ad3823
..
953f4ac
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-13,41
+13,61
@@
# Contact <francois.fleuret@epfl.ch> for comments & bug reports #
#============================================================================#
# Contact <francois.fleuret@epfl.ch> for comments & bug reports #
#============================================================================#
-# CXX=g++-3.3
-
ifeq ($(DEBUG),yes)
ifeq ($(DEBUG),yes)
- CXXFLAGS = -Wall -g -DDEBUG
+ CXXFLAGS = -
fPIC -
Wall -g -DDEBUG
else
# Optimized compilation
else
# Optimized compilation
-
#
CXXFLAGS = -Wall -g -O3 -pg --coverage
- CXXFLAGS = -Wall -g -O3
+
#
CXXFLAGS = -Wall -g -O3 -pg --coverage
+ CXXFLAGS = -
fPIC -
Wall -g -O3
endif
endif
-LDFLAGS = -L/usr/X11R6/lib/
+LDFLAGS = -lz -ldl
+
+# Do we use X11?
+CXXFLAGS += -DX11_SUPPORT
+LDFLAGS += -L/usr/X11R6/lib/
+
+# Do we use cairo?
+CXXFLAGS += -I/usr/include/cairo -DCAIRO_SUPPORT
+LDFLAGS += -lcairo
TASK_SRC = dummy.cc move_square.cc hit_shape.cc
TASK_SRC = dummy.cc move_square.cc hit_shape.cc
-TASK_OBJ = $(TASK_SRC:.cc=.
task
)
+TASK_OBJ = $(TASK_SRC:.cc=.
so
)
-all: main TAGS $(TASK_OBJ)
+all: main
generate
TAGS $(TASK_OBJ)
TAGS: *.cc *.h
etags *.cc *.h
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)
+main: main.o misc.o \
+ simple_window.o \
+ universe.o \
+ plotter.o \
+ polygon.o \
+ xfig_tracer.o \
+ canvas.o canvas_cairo.o \
+ map.o \
+ task.o \
+ retina.o \
+ manipulator.o \
+ approximer.o \
+ intelligence.o
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -lX11 -o $@ $^
-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)
+generate: generate.o misc.o \
+ universe.o \
+ plotter.o \
+ polygon.o \
+ canvas.o canvas_cairo.o
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -lX11 -o $@ $^
-%.
task: %.cc misc.o universe.o polygon
.o map.o task.o manipulator.o
+%.
so: %.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
$(CXX) $(CXXFLAGS) -shared -Wl,-soname,$@ -o $@ $^
Makefile.depend: *.h *.cc Makefile
- $(CC) -M *.cc > Makefile.depend
+ $(CC)
$(CXXFLAGS)
-M *.cc > Makefile.depend
clean:
clean:
- \rm
main *.o *.task
Makefile.depend
+ \rm
-f main *.o *.so
Makefile.depend
-include Makefile.depend
-include Makefile.depend