-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
44 lines (35 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
RFLX_HOME := tools/RecordFlux/
RFLX := $(RFLX_HOME)/.venv/bin/rflx
SPECS := specs/coap_client.rflx specs/coap_server.rflx # $(wildcard specs/*.rflx)
GNATPROVE := gnatprove
GENERATED := $(patsubst specs/%,generated/%,$(SPECS:.rflx=.ads))
RFLX_DEBUG :=
# Set this to activate RecordFlux debug mode
#RFLX_DEBUG := --debug built-in
all: generate
.PHONY: all
# Beware that for CoAP, the only useful type generated by
# its IANA registry is the CoAP Option Code, and we are
# copying it to the manually written coap.rflx, instead of
# including the generated one.
convert_iana: specs/iana_registry/core-parameters.xml
$(RFLX) convert iana -d specs $<
specs/iana_registry/convert_content_formats.awk $< \
> src/coap_spark-content_formats.ads
.PHONY: convert_iana
generate: $(GENERATED)
.PHONY: generate
generated/%.ads: specs/%.rflx
@echo "Generating $@ from $<"
@mkdir -p $(dir $@)
@$(RFLX) generate $(RFLX_DEBUG) -d $(dir $@) specs/*.rflx
@$(RFLX) graph -d $(dir $@) specs/*.rflx
test:
$(MAKE) -C tests test
.PHONY: test
clean:
rm -r $(dir $(GENERATED))
.PHONY: clean
prove: $(GENERATED)
$(GNATPROVE) -Pcoap_spark.gpr
.PHONY: prove