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