aboutsummaryrefslogtreecommitdiffstats
path: root/doc/manual/example1
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-26 10:21:31 +0000
committerKenneth Russel <[email protected]>2006-02-26 10:21:31 +0000
commite24dc9a626d1548f67dc79b8f73c519c392bda33 (patch)
tree472633b6f167ab9542202712a1bc99d38246f5d3 /doc/manual/example1
parent60edc67981e7c3c1d4d43bc80994a8d63952c7bb (diff)
Added five examples of GlueGen configuration files to the manual for
supporting access to various C programming language constructs. Still need to add at least two more for concrete and somewhat complex examples which show up in JOGL. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@18 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'doc/manual/example1')
-rw-r--r--doc/manual/example1/function.c3
-rw-r--r--doc/manual/example1/function.cfg5
-rw-r--r--doc/manual/example1/function.h1
-rw-r--r--doc/manual/example1/gen.sh17
4 files changed, 26 insertions, 0 deletions
diff --git a/doc/manual/example1/function.c b/doc/manual/example1/function.c
new file mode 100644
index 0000000..9a84189
--- /dev/null
+++ b/doc/manual/example1/function.c
@@ -0,0 +1,3 @@
+int one_plus(int a) {
+ return 1 + a;
+}
diff --git a/doc/manual/example1/function.cfg b/doc/manual/example1/function.cfg
new file mode 100644
index 0000000..c604a40
--- /dev/null
+++ b/doc/manual/example1/function.cfg
@@ -0,0 +1,5 @@
+Package testfunction
+Style AllStatic
+JavaClass TestFunction
+JavaOutputDir gensrc/java
+NativeOutputDir gensrc/native
diff --git a/doc/manual/example1/function.h b/doc/manual/example1/function.h
new file mode 100644
index 0000000..58976c1
--- /dev/null
+++ b/doc/manual/example1/function.h
@@ -0,0 +1 @@
+int one_plus(int a);
diff --git a/doc/manual/example1/gen.sh b/doc/manual/example1/gen.sh
new file mode 100644
index 0000000..6fb971e
--- /dev/null
+++ b/doc/manual/example1/gen.sh
@@ -0,0 +1,17 @@
+#!/bin/ksh
+
+JAVA=java
+GLUEGEN_JAR=../../../build/gluegen.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+
+NAME=`uname`
+
+if [ $NAME="Windows*" ] ; then
+ SEP=\;
+elif [ $NAME="CYGWIN*" ] ; then
+ SEP=\;
+else
+ SEP=:
+fi
+
+java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h