Add initial prototype.
This commit is contained in:
33
3-mid/physics/implement/c_math/generate/builder
Executable file
33
3-mid/physics/implement/c_math/generate/builder
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
echo
|
||||
echo Removing prior build.
|
||||
echo
|
||||
|
||||
rm *.ads
|
||||
rm *.adb
|
||||
rm *.cxx
|
||||
rm *.pp
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
|
||||
echo
|
||||
echo Generating the binding.
|
||||
echo
|
||||
|
||||
swig_gnat -gnat -c++ -cpperraswarn c_math_c.i
|
||||
rm portable_new_line_Token.tmp
|
||||
|
||||
|
||||
|
||||
echo
|
||||
echo Pretty printing.
|
||||
echo
|
||||
|
||||
gnatpp -rnb -I/usr/local/include *.ads -cargs -gnat05
|
||||
indent -sob -di16 *.cxx
|
||||
|
||||
31
3-mid/physics/implement/c_math/generate/c_math_c.i
Normal file
31
3-mid/physics/implement/c_math/generate/c_math_c.i
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// SWIG interface defintion for 'c_Math' interface library binding.
|
||||
//
|
||||
|
||||
%module c_math_c
|
||||
|
||||
%{
|
||||
extern "C"
|
||||
{
|
||||
#include "../c/c_math.h"
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
%include "../source/c/c_math.h"
|
||||
|
||||
|
||||
|
||||
// Tailoring
|
||||
//
|
||||
|
||||
%inline
|
||||
%{
|
||||
|
||||
%}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
12
3-mid/physics/implement/c_math/generate/export_source
Executable file
12
3-mid/physics/implement/c_math/generate/export_source
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
rm ../source/thin/*.ads
|
||||
rm ../source/thin/*.cxx
|
||||
|
||||
mv ./*.ads ../source/thin
|
||||
mv ./*.cxx ../source/thin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user