sync/Makefile
author Volker Birk <vb@pep.foundation>
Mon, 03 Sep 2018 21:57:00 +0200
branchsync
changeset 2922 0c2a16e87852
parent 2921 8bae76a4f918
child 2926 f7b7072036c2
permissions -rw-r--r--
better Makefile
     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: makedir .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 makedir
    26 
    27 clean:
    28 	rm -f *.xml *.xsl generated/* .statemachines .actions .codecs .messages *.dot *.svg
    29 
    30 copy:
    31 	cp -f generated/*.c generated/*.h ../src
    32 
    33 makedir:
    34 	-mkdir -p generated
    35 
    36 %.xml: %.fsm
    37 	yml2c $< -o $@
    38 
    39 %.dot: sync.fsm gen_dot.ysl2
    40 	yml2proc -y gen_dot.ysl2 $<
    41 
    42 %.svg: %.dot
    43 	dot -Tsvg -o $@ $<