Makefile 1.09 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
all: test-ada test-llvm

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

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

test-ada:
	../../../opengeode.py --toAda challenge.pr system_structure.pr
	asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
	gnatmake -c *.adb
	gcc -c	test_ada.c
	gnatbind -n challenge.ali
	gnatlink -o testcase  test_ada.o challenge.ali -lgnat -lm
	./testcase | diff expected -

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

coverage:
	coverage run -p ../../../opengeode.py challenge.pr system_structure.pr --toAda

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

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