added basic Modula-3 support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ad57fc3545
commit
483d8b4367
57 changed files with 6645 additions and 380 deletions
8
SWIG/Examples/modula3/simple/.cvsignore
Normal file
8
SWIG/Examples/modula3/simple/.cvsignore
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
*_wrap.c
|
||||
*_wrap.xml
|
||||
*.i3
|
||||
*.m3
|
||||
m3makefile
|
||||
src
|
||||
Release
|
||||
Debug
|
||||
21
SWIG/Examples/modula3/simple/Makefile
Normal file
21
SWIG/Examples/modula3/simple/Makefile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
TOP = ../..
|
||||
SWIG = $(TOP)/../swig
|
||||
SRCS =
|
||||
TARGET = example
|
||||
INTERFACE = example.i
|
||||
SWIGOPT =
|
||||
MODULA3SRCS = *.[im]3
|
||||
|
||||
all:: modula3
|
||||
|
||||
modula3::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3
|
||||
m3ppinplace $(MODULA3SRCS)
|
||||
mv m3makefile $(MODULA3SRCS) src/
|
||||
cm3
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile modula3_clean
|
||||
|
||||
check: all
|
||||
18
SWIG/Examples/modula3/simple/example.c
Normal file
18
SWIG/Examples/modula3/simple/example.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* File : example.c */
|
||||
|
||||
/* A global variable */
|
||||
double Foo = 3.0;
|
||||
|
||||
/* Compute the greatest common divisor of positive integers */
|
||||
int gcd(int x, int y) {
|
||||
int g;
|
||||
g = y;
|
||||
while (x > 0) {
|
||||
g = x;
|
||||
x = y % x;
|
||||
y = g;
|
||||
}
|
||||
return g;
|
||||
}
|
||||
|
||||
|
||||
5
SWIG/Examples/modula3/simple/example.i
Normal file
5
SWIG/Examples/modula3/simple/example.i
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/* File : example.i */
|
||||
%module Example
|
||||
|
||||
extern int gcd(int x, int y);
|
||||
extern double Foo;
|
||||
Loading…
Add table
Add a link
Reference in a new issue