summaryrefslogtreecommitdiff
path: root/tools/dfagen/examples/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dfagen/examples/Makefile')
-rw-r--r--tools/dfagen/examples/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/dfagen/examples/Makefile b/tools/dfagen/examples/Makefile
index b78f1121..1f7b3308 100644
--- a/tools/dfagen/examples/Makefile
+++ b/tools/dfagen/examples/Makefile
@@ -1,6 +1,6 @@
CFLAGS = -O2 -Wall
-all: ex1 ex2 ex1.png ex2.png
+all: ex1 ex2 ex1.png ex2.png ex2_tpl
ex1: ex1.o ex1_cb.o
@@ -12,6 +12,7 @@ ex1.h ex1_cb_skel.c ex1_cb.h: ex1.c
ex1_cb.c: ex1_cb_skel.c ex1_cb.c.patch
cp $< $@
patch $@ ex1_cb.c.patch
+ rm -f $@.orig
ex1.o: ex1_cb.h ex1.h
ex1_cb.o: ex1_cb.h ex1.h
@@ -26,6 +27,10 @@ ex2.h ex2_cb_skel.c ex2_cb.h: ex2.c
ex2_cb.c: ex2_cb_skel.c ex2_cb.c.patch
cp $< $@
patch $@ ex2_cb.c.patch
+ rm -f $@.orig
+
+ex2_tpl: ex2.fsm ex2_tpl.conf
+ python ../dfagen.py -o c -d $(filter %.fsm, $^) -c $(filter %.conf, $^) -p $@
%.dot: %.fsm
python ../dfagen.py -o dot -d $< -p $(@:%.dot=%)
@@ -38,3 +43,4 @@ clean:
rm -f ex1.dot ex1.png
rm -f ex2 ex2.o ex2_cb.o ex2_robot.o ex2.c ex2.h ex2_cb_skel.c ex2_cb.h ex2_cb.c
rm -f ex2.dot ex2.png
+ rm -f ex2_tpl_defs.h ex2_tpl_table.h