summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/Makefile.defs
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/Makefile.defs')
-rw-r--r--2005/i/robert/src/Makefile.defs37
1 files changed, 32 insertions, 5 deletions
diff --git a/2005/i/robert/src/Makefile.defs b/2005/i/robert/src/Makefile.defs
index 3415c27..3c8e957 100644
--- a/2005/i/robert/src/Makefile.defs
+++ b/2005/i/robert/src/Makefile.defs
@@ -1,14 +1,32 @@
-CXXFLAGS = -O2 -Wall -g
+CXXFLAGS = -Wall -g
CPPFLAGS = -MMD $(INCLUDES)
-INCLUDES = -I$(SRCDIR)
+INCLUDES = -I$(SRCDIR) -I.
+
+ifeq ($(COV),)
+CXXFLAGS += -O2
+else
+CXXFLAGS += -fprofile-arcs -ftest-coverage
+endif
+
+ifneq ($(PROF),)
+CXXFLAGS += -pg
+LDFLAGS += -pg
+endif
+
+# Messages sur une ligne.
+CXXFLAGS += -fmessage-length=0
# Attention, il y a un problème de dépendences dans l'ordre des SUBDIRS à
# cause de la génération des règles.
-SUBDIRS = log serial timer \
- utils utils/meta \
- scheduler
+SUBDIRS = utils utils/meta \
+ log serial timer \
+ config image scheduler \
+ video4linux
LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH)
+LEX = flex
+YACC = bison
+
VPATH = $(SUBDIRS:%=$(SRCDIR)/%)
PROGRAMS =
@@ -23,11 +41,20 @@ OBJECTS = $(filter %.o,$(foreach PROGRAM,$(PROGRAMS),$($(PROGRAM)_OBJECTS)))
build-all: $(PROGRAMS)
+# Régles.
+%.cc: %.ll
+ $(LEX) $<
+
+%.cc: %.yy
+ $(YACC) -o $@ $<
+
# Dépendances.
-include $(OBJECTS:%.o=%.d)
# Ménage.
clean:
rm -f *.o *.d $(PROGRAMS)
+ rm -f *.bbg *.bb *.da *.gcov
+ rm -f gmon.out
.PHONY: all build-all clean