summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/automate/GNUmakefile
diff options
context:
space:
mode:
authorschodet2003-05-08 15:18:58 +0000
committerschodet2003-05-08 15:18:58 +0000
commitfa92b08399708d7846d61094a9b73983684d2138 (patch)
treeeb511beea201931788b9d3b4b7790f7160d02734 /2003/i/buzz/src/automate/GNUmakefile
parente5287bcd6975507ce4f03b4dad082c3cdccf96ca (diff)
Ajout du module automate
Diffstat (limited to '2003/i/buzz/src/automate/GNUmakefile')
-rw-r--r--2003/i/buzz/src/automate/GNUmakefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/2003/i/buzz/src/automate/GNUmakefile b/2003/i/buzz/src/automate/GNUmakefile
new file mode 100644
index 0000000..0f0e9b7
--- /dev/null
+++ b/2003/i/buzz/src/automate/GNUmakefile
@@ -0,0 +1,30 @@
+SRCDIR = ..
+CXXFLAGS = -Wall -g
+CPPFLAGS = -I$(SRCDIR)
+
+TARGETS = grafcet.a
+grafcet_a_SOURCES = grafcet.cc receptivite.cc action.cc grammar.tab.cc lexer.cc
+
+all: $(TARGETS)
+
+grammar.tab.cc grammar.tab.hh: grammar.yy
+ bison $<
+
+lexer.cc: lexer.ll grammar.tab.hh
+ flex -o$@ $<
+
+grafcet.a: ${grafcet_a_SOURCES:%.cc=grafcet.a(%.o)}
+
+.dep/%.d: %.cc .dep
+ @set -e; $(CC) -M $(CPPFLAGS) $< \
+ | sed 's/\($*\)\.o[ :]*/\1.o .dep\/$*.d : /g' > $@; \
+ [ -s $@ ] || rm -f $@
+
+-include $(grafcet_a_SOURCES:%.cc=.dep/%.d)
+
+.dep:
+ @mkdir .dep
+
+clean:
+ rm -f $(TARGETS) *.o
+ rm -rf .dep