Commit f7623752 authored by Maxime Perrotin's avatar Maxime Perrotin

Improve the generation of the simulation files

parent be957cab
......@@ -288,14 +288,14 @@ mono $(which asn1.exe) -c -typePrefix asn1Scc -equal {asn1}'''.format(
asn1=asn1_filenames)
simu_script += '''
gprbuild -p -P ../{pr}_lib.gpr
gprbuild -p -P {pr}_lib.gpr
rm -f dataview-uniq.c dataview-uniq.h
asn2aadlPlus dataview-uniq.asn DataView.aadl
aadl2glueC DataView.aadl {pr}_interface.aadl
asn2dataModel -toPython dataview-uniq.asn
make -f Makefile.python
echo "errCodes=$(taste-asn1-errCodes ./dataview-uniq.h)" >>datamodel.py
LD_LIBRARY_PATH=../lib:. opengeode-simulator
LD_LIBRARY_PATH=./lib:. opengeode-simulator
'''.format(pr=process_name.lower(),
asn1_files=asn1_filenames,
asn1_mod=' '.join(asn1_modules_o))
......
......@@ -10,6 +10,11 @@ edit:
test-parse:
$(OPENGEODE) controller.pr system_structure.pr --check
simu:
$(OPENGEODE) --shared controller.pr system_structure.pr
gprbuild -p -P dataview_ada
./controller_simu.sh
test-qgen-parse:
$(TESTQGEN_PARSE) $(ROOT_MODEL)
......@@ -44,4 +49,4 @@ test-llvm:
coverage:
coverage run -p $(OPENGEODE) controller.pr system_structure.pr --toAda
.PHONY: all edit test-parse test-ada test-llvm coverage
.PHONY: all edit test-parse test-ada test-llvm coverage simu
all:
gprbuild -p -P controller.gpr # generate Ada code from the SDL model
gprbuild -p -P dataview_ada.gpr # generate Ada code from the ASN.1 model
gprbuild -p -P code/controller_ada.gpr # build the Ada code
clean:
rm -rf obj code
\ No newline at end of file
project controller is
for Languages use ("SDL");
for Source_Dirs use (".");
for Object_Dir use "code";
for Source_Files use ("controller.pr");
package Naming is
for Body_Suffix ("SDL") use ".pr";
end Naming;
package Compiler is
for Driver ("SDL") use "opengeode";
for Object_File_Suffix ("SDL") use ".adb";
for Leading_Required_Switches ("SDL") use ("--toAda", "../system_structure.pr");
end Compiler;
end controller;
\ No newline at end of file
project controller_Ada is
for Languages use ("Ada");
for Source_Dirs use (".") & External_As_List ("CODE_PATH", ":");
for Object_Dir use "../obj";
end controller_Ada;
\ No newline at end of file
project DataView_Ada is
for Languages use ("ASN1");
for Source_Dirs use (".");
for Source_Files use ("dataview-uniq.asn");
for Object_Dir use "code";
package Naming is
for Body_Suffix ("ASN1") use ".asn";
end Naming;
package Compiler is
for Driver ("ASN1") use "asn1.exe";
for Leading_Required_Switches ("ASN1") use ("-Ada", "-typePrefix", "Asn1Scc");
end Compiler;
end DataView_Ada;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment