sync/Makefile
author Volker Birk <vb@pep.foundation>
Tue, 07 Aug 2018 17:16:03 +0200
branchsync
changeset 2829 e444c3c960bb
parent 2302 3fbe4956dd34
child 2830 d6f044e43e1a
permissions -rw-r--r--
cut things in
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
	cp -f generated/*.c generated/*.h ../src
vb@2829
    10
	touch .codegen
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
krista@2271
    24
.PHONY: clean
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
krista@2271
    31
%.xml: %.fsm
vb@2829
    32
	yml2c $< -o $@
krista@2271
    33
vb@2829
    34
%.dot: sync.fsm gen_dot.ysl2
vb@2829
    35
	yml2proc -y gen_dot.ysl2 $<
krista@2271
    36
krista@2271
    37
%.svg: %.dot
krista@2271
    38
	dot -Tsvg -o $@ $<