Makefile 1.19 KB
Newer Older
dbarbera's avatar
dbarbera committed
1
2
include ../shared.mk

3
4
5
6
7
8
9
10
11
12
13
14
15
all: test-ada

edit:
	../../../opengeode.py myfunction.pr system_structure.pr

test-parse:
	../../../opengeode.py myfunction.pr system_structure.pr --check

test-ada:
	../../../opengeode.py --toAda myfunction.pr system_structure.pr || exit 1
	asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
	asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc
	gnatmake -c myfunction.adb
dbarbera's avatar
dbarbera committed
16
	gcc -c test_ada.c
17
	gnatbind -n myfunction.ali
dbarbera's avatar
dbarbera committed
18
19
	gnatlink -o test_ada test_ada.o myfunction.ali -lgnat
	./test_ada | diff expected -
20

21
22
test-llvm:
	../../../opengeode.py myfunction.pr system_structure.pr --check --llvm
dbarbera's avatar
dbarbera committed
23
	asn1.exe -c dataview-uniq.asn -equal -typePrefix asn1Scc
24
	llc myfunction.ll
dbarbera's avatar
dbarbera committed
25
26
27
	gcc -c myfunction.s
	gcc -c dataview-uniq.c
	gcc -c test_llvm.c
dbarbera's avatar
dbarbera committed
28
29
	gcc myfunction.o dataview-uniq.o test_llvm.o -o test_llvm -lm
	./test_llvm | diff expected -
30

31
32
33
34
coverage:
	coverage run  -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda

clean:
35
	rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
dbarbera's avatar
dbarbera committed
36
37
	bin *.wrn *.gpr *.ll *.s dataview-uniq.c dataview-uniq.h real.c xer.c \
	ber.c acn.c asn1crt.c asn1crt.h test_ada test_llvm
38

dbarbera's avatar
dbarbera committed
39
.PHONY: all edit test-parse test-ada test-llvm coverage clean