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

dbarbera's avatar
dbarbera committed
3
all: test-ada test-llvm
Maxime Perrotin's avatar
Maxime Perrotin committed
4

dbarbera's avatar
dbarbera committed
5
6
7
edit:
	../../../opengeode.py myfunction.pr system_structure.pr

dbarbera's avatar
dbarbera committed
8
9
test-parse:
	../../../opengeode.py myfunction.pr system_structure.pr --check
Maxime Perrotin's avatar
Maxime Perrotin committed
10

dbarbera's avatar
dbarbera committed
11
test-ada:
12
	../../../opengeode.py --toAda myfunction.pr system_structure.pr || exit 1
Maxime Perrotin's avatar
Maxime Perrotin committed
13
	asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
Maxime Perrotin's avatar
Maxime Perrotin committed
14
	asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc
dbarbera's avatar
dbarbera committed
15
	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 -
Maxime Perrotin's avatar
Maxime Perrotin committed
20

dbarbera's avatar
dbarbera committed
21
test-llvm:
dbarbera's avatar
dbarbera committed
22
23
	../../../opengeode.py myfunction.pr system_structure.pr --check --llvm
	asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc -equal
dbarbera's avatar
dbarbera committed
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 -
dbarbera's avatar
dbarbera committed
30

Maxime Perrotin's avatar
Maxime Perrotin committed
31
32
33
34
coverage:
	coverage run  -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda

clean:
dbarbera's avatar
dbarbera committed
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
dbarbera's avatar
dbarbera committed
38
39

.PHONY: all edit test-parse test-ada test-llvm coverage clean