summaryrefslogtreecommitdiff
path: root/i/marvin/src/Makefile.defs
diff options
context:
space:
mode:
authorschodet2005-10-09 20:05:43 +0000
committerschodet2005-10-09 20:05:43 +0000
commitcf4aa6ae31d5edcfedf36097791ff533e74a097d (patch)
treec9ce878e492588e60b0cd88ddeba485955f7d938 /i/marvin/src/Makefile.defs
parent63215e6ab9425603b59a3809ec98d2266984330a (diff)
Ajout du kit de survie.
Voila, j'arrète là, à vous de remplir.
Diffstat (limited to 'i/marvin/src/Makefile.defs')
-rw-r--r--i/marvin/src/Makefile.defs63
1 files changed, 63 insertions, 0 deletions
diff --git a/i/marvin/src/Makefile.defs b/i/marvin/src/Makefile.defs
new file mode 100644
index 0000000..8b0e709
--- /dev/null
+++ b/i/marvin/src/Makefile.defs
@@ -0,0 +1,63 @@
+# Flags.
+CXXFLAGS = -Wall -g
+CPPFLAGS = -MMD $(INCLUDES)
+INCLUDES = -I$(SRCDIR) -I.
+
+# Tests de coverage (man gcov).
+ifeq ($(COV),)
+#CXXFLAGS += -O2
+else
+CXXFLAGS += -fprofile-arcs -ftest-coverage
+endif
+
+# Profiling (man gprof).
+ifneq ($(PROF),)
+CXXFLAGS += -pg
+LDFLAGS += -pg
+endif
+
+
+# Messages sur une ligne.
+CXXFLAGS += -fmessage-length=0
+
+# Attention, il y a un problme de dpendences dans l'ordre des SUBDIRS
+# cause de la gnration des rgles.
+SUBDIRS =
+
+LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH)
+LEX = flex
+YACC = bison
+
+VPATH = $(SUBDIRS:%=$(SRCDIR)/%)
+
+PROGRAMS =
+LIBS =
+EXTRA_CLEAN =
+
+all: build-all
+
+# Inclus les autres rpertoires.
+include $(SUBDIRS:%=$(SRCDIR)/%/Makefile.defs)
+
+OBJECTS = $(filter %.o,$(foreach PROGRAM,$(PROGRAMS),$($(PROGRAM)_OBJECTS)))
+
+build-all: $(PROGRAMS)
+
+# Rgles.
+%.cc: %.ll
+ $(LEX) $<
+
+%.cc: %.yy
+ $(YACC) -o $@ $<
+
+# Dpendances.
+-include $(OBJECTS:%.o=%.d)
+
+# Mnage.
+clean:
+ rm -f *.o *.d $(PROGRAMS)
+ rm -f *.bbg *.bb *.da *.gcov
+ rm -f gmon.out
+ rm -f $(EXTRA_CLEAN)
+
+.PHONY: all build-all clean