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