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
     1 # This file is under GNU General Public License 3.0
     2 # see LICENSE.txt
     3 
     4 include ../Makefile.conf
     5 
     6 all: copy
     7 
     8 generated:
     9 	mkdir -p $@
    10 
    11 .actions: sync.fsm gen_actions.ysl2 fsm.yml2 functions.ysl2 $(wildcard cond_act_*.yml2) | generated
    12 	$(YML2_PROC) -y gen_actions.ysl2 $< -o $@
    13 
    14 .statemachines: sync.fsm gen_statemachine.ysl2 fsm.yml2 functions.ysl2 | generated
    15 	$(YML2_PROC) -y gen_statemachine.ysl2 $< -o $@
    16 
    17 .codecs: sync.fsm gen_codec.ysl2 fsm.yml2 functions.ysl2 | generated
    18 	$(YML2_PROC) -y gen_codec.ysl2 $< -o $@
    19 
    20 .messages: sync.fsm gen_messages.ysl2 gen_message_func.ysl2 fsm.yml2 functions.ysl2 | generated
    21 	$(YML2_PROC) -y gen_messages.ysl2 $< -o $@
    22 	$(YML2_PROC) -y gen_message_func.ysl2 $< -o $@
    23 
    24 .PHONY: clean
    25 clean:
    26 	rm -rf generated
    27 	rm -f *.xml *.xsl .statemachines .actions .codecs .messages *.dot *.svg
    28 
    29 .PHONY: copy
    30 copy: .actions .statemachines .codecs .messages
    31 	cp -f generated/*.c generated/*.h ../src
    32 
    33 %.xml: %.fsm
    34 	yml2c $< -o $@
    35 
    36 %.dot: sync.fsm gen_dot.ysl2
    37 	$(YML2_PROC) -y gen_dot.ysl2 $<
    38 
    39 %.svg: %.dot
    40 	dot -Tsvg -o $@ $<
    41