sync/Makefile
author Volker Birk <vb@pep.foundation>
Mon, 03 Sep 2018 16:32:05 +0200
branchsync
changeset 2921 8bae76a4f918
parent 2899 63b619aef131
child 2922 0c2a16e87852
permissions -rw-r--r--
add mkdir
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@2844
    12
.actions: sync.fsm gen_actions.ysl2 fsm.yml2 functions.ysl2 $(wildcard cond_act_*.yml2)
vb@2921
    13
	-mkdir -p generated
vb@2829
    14
	$(YML2_PROC) -y gen_actions.ysl2 $< -o $@
krista@2271
    15
vb@2829
    16
.statemachines: sync.fsm gen_statemachine.ysl2 fsm.yml2 functions.ysl2
vb@2921
    17
	-mkdir -p generated
vb@2829
    18
	$(YML2_PROC) -y gen_statemachine.ysl2 $< -o $@
krista@2271
    19
vb@2840
    20
.codecs: sync.fsm gen_codec.ysl2 fsm.yml2 functions.ysl2
vb@2921
    21
	-mkdir -p generated
vb@2840
    22
	$(YML2_PROC) -y gen_codec.ysl2 $< -o $@
vb@2840
    23
vb@2840
    24
.messages: sync.fsm gen_messages.ysl2 gen_message_func.ysl2 fsm.yml2 functions.ysl2
vb@2921
    25
	-mkdir -p generated
vb@2840
    26
	$(YML2_PROC) -y gen_messages.ysl2 $< -o $@
vb@2829
    27
	$(YML2_PROC) -y gen_message_func.ysl2 $< -o $@
vb@2829
    28
vb@2830
    29
.PHONY: clean copy
vb@2829
    30
krista@2271
    31
clean:
vb@2829
    32
	rm -f *.xml *.xsl \
vb@2829
    33
    $(pathsub generated/%, ../src/% $(wildcard generated/*.*)) \
vb@2899
    34
    generated/* .statemachines .actions .codecs .messages *.dot *.svg
krista@2271
    35
vb@2830
    36
copy:
vb@2830
    37
	cp -f generated/*.c generated/*.h ../src
vb@2830
    38
krista@2271
    39
%.xml: %.fsm
vb@2829
    40
	yml2c $< -o $@
krista@2271
    41
vb@2829
    42
%.dot: sync.fsm gen_dot.ysl2
vb@2829
    43
	yml2proc -y gen_dot.ysl2 $<
krista@2271
    44
krista@2271
    45
%.svg: %.dot
krista@2271
    46
	dot -Tsvg -o $@ $<