sync/Makefile
author Damiano Boppart <damiano.boppart@pep.security>
Sat, 22 Dec 2018 01:34:30 +0100
branchmake-cleanup
changeset 3204 fa2e7ead0f4e
parent 3201 105b50dfaf15
child 3257 02ef5b3ce34a
permissions -rw-r--r--
Minor makefile fixes
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
krista@2271
     6
all: .codegen
krista@2271
     7
damiano@3204
     8
.codegen: .statemachines .actions .codecs .messages
damiano@3204
     9
	-mkdir -p generated
vb@2829
    10
	touch .codegen
damiano@3204
    11
	$(MAKE) copy
krista@2271
    12
vb@2844
    13
.actions: sync.fsm gen_actions.ysl2 fsm.yml2 functions.ysl2 $(wildcard cond_act_*.yml2)
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@2829
    17
	$(YML2_PROC) -y gen_statemachine.ysl2 $< -o $@
krista@2271
    18
vb@2840
    19
.codecs: sync.fsm gen_codec.ysl2 fsm.yml2 functions.ysl2
vb@2840
    20
	$(YML2_PROC) -y gen_codec.ysl2 $< -o $@
vb@2840
    21
vb@2840
    22
.messages: sync.fsm gen_messages.ysl2 gen_message_func.ysl2 fsm.yml2 functions.ysl2
vb@2840
    23
	$(YML2_PROC) -y gen_messages.ysl2 $< -o $@
vb@2829
    24
	$(YML2_PROC) -y gen_message_func.ysl2 $< -o $@
vb@2829
    25
vb@2926
    26
.PHONY: clean copy
vb@2829
    27
krista@2271
    28
clean:
damiano@3195
    29
	rm -f *.xml *.xsl generated/* .statemachines .actions .codecs .messages .codegen *.dot *.svg
krista@2271
    30
vb@2830
    31
copy:
vb@2830
    32
	cp -f generated/*.c generated/*.h ../src
vb@2830
    33
krista@2271
    34
%.xml: %.fsm
vb@2829
    35
	yml2c $< -o $@
krista@2271
    36
vb@2829
    37
%.dot: sync.fsm gen_dot.ysl2
vb@2829
    38
	yml2proc -y gen_dot.ysl2 $<
krista@2271
    39
krista@2271
    40
%.svg: %.dot
krista@2271
    41
	dot -Tsvg -o $@ $<