Makefile 939 Bytes
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1
2
include ../shared.mk

3
4
ROOT_MODEL=system_structure.pr

Maxime Perrotin's avatar
Maxime Perrotin committed
5
6
7
8
9
10
11
12
all: test-ada test-llvm

edit:
	$(OPENGEODE) challenge.pr system_structure.pr

test-parse:
	$(OPENGEODE) challenge.pr system_structure.pr --check

13
test-qgen-parse:
14
15
16
17
18
19
20
	$(TESTQGEN_PARSE) $(ROOT_MODEL)

test-qgen-ada:
	$(TESTQGEN_ADA) $(ROOT_MODEL)

test-qgen-c:
	$(TESTQGEN_C) $(ROOT_MODEL)
21

Maxime Perrotin's avatar
Maxime Perrotin committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
test-ada: challenge.ali dataview-uniq.o | test_ada.o
	$(GNATBIND) -n challenge.ali
	$(GNATLINK) -o test_ada  test_ada.o challenge.ali -lgnat -lm
	./test_ada

test-c: challenge.c test_c.o dataview-uniq.o
	$(CC) -include missing.h challenge.c -c -o challenge.o
	$(CC) test_c.o challenge.c dataview-uniq.o -lm -o test_c
	./test_c

test-llvm: challenge.o dataview-uniq.o | test_llvm.o
	$(CC) challenge.o dataview-uniq.o test_llvm.o -o test_llvm -lm
	./test_llvm

coverage:
	coverage run -p $(OPENGEODE) challenge.pr system_structure.pr --toAda

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