Makefile 1.11 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
	gcc -c test.c
	gnatbind -n myfunction.ali
	gnatlink -o testcase test.o myfunction.ali -lgnat
	./testcase | diff expected -

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

29
30
31
32
coverage:
	coverage run  -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda

clean:
33
34
	rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
	bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c *.ll *.s testcase
35

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