sync/Makefile
author Volker Birk <vb@pep.foundation>
Thu, 09 Aug 2018 12:15:44 +0200
branchsync
changeset 2830 d6f044e43e1a
parent 2829 e444c3c960bb
child 2840 b881c48c9e9d
permissions -rw-r--r--
...
vb@2829
     1
# This file is under GNU General Public License 3.0
krista@2271
     2
# see LICENSE.txt
krista@2271
     3
krista@2271
     4
include ../default.conf
krista@2271
     5
krista@2271
     6
all: .codegen
krista@2271
     7
vb@2829
     8
.codegen: .statemachines .actions .codecs .messages
vb@2829
     9
	touch .codegen
vb@2830
    10
	make copy
krista@2271
    11
vb@2829
    12
.actions: sync.fsm gen_actions.ysl2 fsm.yml2 functions.ysl2 cond_act.yml2
vb@2829
    13
	$(YML2_PROC) -y gen_actions.ysl2 $< -o $@
krista@2271
    14
vb@2829
    15
.statemachines: sync.fsm gen_statemachine.ysl2 fsm.yml2 functions.ysl2
vb@2829
    16
	$(YML2_PROC) -y gen_statemachine.ysl2 $< -o $@
krista@2271
    17
vb@2829
    18
.codecs: sync.fsm gen_message_func.ysl2 fsm.yml2 functions.ysl2
vb@2829
    19
	$(YML2_PROC) -y gen_message_func.ysl2 $< -o $@
vb@2829
    20
vb@2829
    21
.messages: sync.fsm gen_messages.ysl2 fsm.yml2 functions.ysl2
vb@2829
    22
	$(YML2_PROC) -y gen_messages.ysl2 $< -o $@
krista@2271
    23
vb@2830
    24
.PHONY: clean copy
vb@2829
    25
krista@2271
    26
clean:
vb@2829
    27
	rm -f *.xml *.xsl \
vb@2829
    28
    $(pathsub generated/%, ../src/% $(wildcard generated/*.*)) \
vb@2829
    29
    ../generated/* .statemachines .actions .codecs .messages *.dot *.svg
krista@2271
    30
vb@2830
    31
copy:
vb@2830
    32
	cp -f generated/*.c generated/*.h ../src
vb@2830
    33
krista@2271
    34
%.xml: %.fsm
vb@2829
    35
	yml2c $< -o $@
krista@2271
    36
vb@2829
    37
%.dot: sync.fsm gen_dot.ysl2
vb@2829
    38
	yml2proc -y gen_dot.ysl2 $<
krista@2271
    39
krista@2271
    40
%.svg: %.dot
krista@2271
    41
	dot -Tsvg -o $@ $<