Makefile 1.13 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
16
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
dbarbera's avatar
dbarbera committed
17
18
	gnatlink -o test_ada  test_ada.o challenge.ali -lgnat -lm
	./test_ada | diff expected -
19
20
21
22
23

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
24
25
26
	gcc -c challenge.s
	gcc -c dataview-uniq.c
	gcc -c test_llvm.c
dbarbera's avatar
dbarbera committed
27
28
	gcc challenge.o dataview-uniq.o test_llvm.o -o test_llvm -lm
	./test_llvm | diff expected -
29
30
31
32
33
34

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 \
dbarbera's avatar
dbarbera committed
35
36
	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
37
38

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