Makefile 2.08 KB
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) orchestrator.pr system_structure.pr

test-parse:
	$(OPENGEODE) orchestrator.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

22
23
24
25
26
27
test-qgen-gt-ada:
	$(TESTQGEN_GT_ADA) $(ROOT_MODEL)

test-qgen-gt-c:
	$(TESTQGEN_GT_C) $(ROOT_MODEL)

Maxime Perrotin's avatar
Maxime Perrotin committed
28
test-ada: 
Maxime Perrotin's avatar
Maxime Perrotin committed
29
	$(OPENGEODE) orchestrator.pr system_structure.pr --shared
30
	mono $(ASN1SCC) -c -typePrefix asn1Scc -equal dataview-uniq.asn orchestrator_datamodel.asn
Maxime Perrotin's avatar
Maxime Perrotin committed
31
	$(CC) -c -g test_ada.c
32
	mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview-uniq.asn orchestrator_datamodel.asn
Maxime Perrotin's avatar
Maxime Perrotin committed
33
	$(CC) -c external_proc.c
Maxime Perrotin's avatar
Maxime Perrotin committed
34
35
	$(GNATMAKE) -O$(O) -gnat2012 -c *.adb
	$(GNATBIND) -n orchestrator.ali
36
	$(GNATLINK) -o test_ada test_ada.o external_proc.o orchestrator.ali
Maxime Perrotin's avatar
Maxime Perrotin committed
37
38
	./test_ada

39
40
41
42
43
44
45
simu:
	$(OPENGEODE) orchestrator.pr system_structure.pr --shared
	taste-properties -s properties orchestrator.pr system_structure.pr
	make -f Makefile.properties
	./orchestrator_simu.sh


46
test-c:
47
	mono $(ASN1SCC) -c -typePrefix asn1Scc -equal dataview-uniq.asn
48
49
50
51
52
	$(CC) -c -g test_c.c
	$(OPENGEODE) orchestrator.pr system_structure.pr --shared --toC
	$(CC) -O$(O) test_c.c external_proc.c orchestrator.c -o test_c
	./test_c | diff - expected

Maxime Perrotin's avatar
Maxime Perrotin committed
53
54
55
56
test-llvm: orchestrator.o

test-python:
	$(OPENGEODE) orchestrator.pr system_structure.pr --shared
57
58
	mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview-uniq.asn
	mono $(ASN1SCC) -c  -typePrefix asn1Scc -equal dataview-uniq.asn
59
	$(GNATMAKE) -O$(O) -gnat2012 -fPIC -c *.adb
Maxime Perrotin's avatar
Maxime Perrotin committed
60
	$(GNATBIND) -n -Lliborchestrator orchestrator
61
62
	$(GNATMAKE) -c -fPIC -gnat2012 b~orchestrator.adb
	$(CC) -c -fPIC external_proc.c
63
	$(CC) -shared -fPIC -o liborchestrator.so b~orchestrator.o orchestrator.o taste_basictypes.o adaasn1rtl.o external_proc.o
Maxime Perrotin's avatar
Maxime Perrotin committed
64
65
66
67
68
	python -c "from ctypes import *; test=CDLL('./liborchestrator.so'); test.liborchestratorinit()"

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

Maxime Perrotin's avatar
Maxime Perrotin committed
69
.PHONY: all edit test-parse test-ada test-llvm coverage simu