sync/Makefile
author Damiano Boppart <damiano.boppart@pep.security>
Thu, 31 Jan 2019 23:58:58 +0100
branchmake-cleanup
changeset 3257 02ef5b3ce34a
parent 3204 fa2e7ead0f4e
child 3444 b02aedcd6a50
permissions -rw-r--r--
Refactor sync/Makefile
vb@2829
     1
# This file is under GNU General Public License 3.0
krista@2271
     2
# see LICENSE.txt
krista@2271
     3
damiano@3201
     4
include ../Makefile.conf
krista@2271
     5
damiano@3257
     6
all: copy
krista@2271
     7
damiano@3257
     8
generated:
damiano@3257
     9
	mkdir -p $@
krista@2271
    10
damiano@3257
    11
.actions: sync.fsm gen_actions.ysl2 fsm.yml2 functions.ysl2 $(wildcard cond_act_*.yml2) | generated
vb@2829
    12
	$(YML2_PROC) -y gen_actions.ysl2 $< -o $@
krista@2271
    13
damiano@3257
    14
.statemachines: sync.fsm gen_statemachine.ysl2 fsm.yml2 functions.ysl2 | generated
vb@2829
    15
	$(YML2_PROC) -y gen_statemachine.ysl2 $< -o $@
krista@2271
    16
damiano@3257
    17
.codecs: sync.fsm gen_codec.ysl2 fsm.yml2 functions.ysl2 | generated
vb@2840
    18
	$(YML2_PROC) -y gen_codec.ysl2 $< -o $@
vb@2840
    19
damiano@3257
    20
.messages: sync.fsm gen_messages.ysl2 gen_message_func.ysl2 fsm.yml2 functions.ysl2 | generated
vb@2840
    21
	$(YML2_PROC) -y gen_messages.ysl2 $< -o $@
vb@2829
    22
	$(YML2_PROC) -y gen_message_func.ysl2 $< -o $@
vb@2829
    23
damiano@3257
    24
.PHONY: clean
damiano@3257
    25
clean:
damiano@3257
    26
	rm -rf generated
damiano@3257
    27
	rm -f *.xml *.xsl .statemachines .actions .codecs .messages *.dot *.svg
vb@2829
    28
damiano@3257
    29
.PHONY: copy
damiano@3257
    30
copy: .actions .statemachines .codecs .messages
vb@2830
    31
	cp -f generated/*.c generated/*.h ../src
vb@2830
    32
krista@2271
    33
%.xml: %.fsm
vb@2829
    34
	yml2c $< -o $@
krista@2271
    35
vb@2829
    36
%.dot: sync.fsm gen_dot.ysl2
damiano@3257
    37
	$(YML2_PROC) -y gen_dot.ysl2 $<
krista@2271
    38
krista@2271
    39
%.svg: %.dot
krista@2271
    40
	dot -Tsvg -o $@ $<
damiano@3257
    41