sync/Makefile
author Damiano Boppart <damiano.boppart@pep.security>
Tue, 18 Dec 2018 13:45:38 +0100
branchmake-cleanup
changeset 3195 47da24127579
parent 2926 f7b7072036c2
child 3201 105b50dfaf15
permissions -rw-r--r--
Start make cleanup
     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: generated .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
    26 
    27 clean:
    28 	rm -f *.xml *.xsl generated/* .statemachines .actions .codecs .messages .codegen *.dot *.svg
    29 
    30 copy:
    31 	cp -f generated/*.c generated/*.h ../src
    32 
    33 generated: .codegen
    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 $@ $<