summaryrefslogtreecommitdiff
path: root/Examples/python/java
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/python/java')
-rw-r--r--Examples/python/java/Makefile15
-rw-r--r--Examples/python/java/example.i4
2 files changed, 12 insertions, 7 deletions
diff --git a/Examples/python/java/Makefile b/Examples/python/java/Makefile
index 12a9b512a..4befa38ba 100644
--- a/Examples/python/java/Makefile
+++ b/Examples/python/java/Makefile
@@ -6,17 +6,18 @@ INTERFACE = example.i
LIBS = -lm
check: build
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
-build: Example.class
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
- TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXX="gcj" \
+build: Example.class Example.h
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
CXXSHARED="gcj -fpic -shared Example.class" DEFS='' LIBS="-lstdc++" python_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
rm -f $(TARGET).py
rm -f *.class Example.h
-Example.class: Example.java
- gcj -fPIC -C -c -g Example.java
- gcjh Example
+Example.class Example.h: $(SRCDIR)Example.java
+ gcj -d . -fPIC -C -c -g $(SRCDIR)Example.java
+ gcjh Example.class
diff --git a/Examples/python/java/example.i b/Examples/python/java/example.i
index 13d5b5e70..80e08870f 100644
--- a/Examples/python/java/example.i
+++ b/Examples/python/java/example.i
@@ -7,3 +7,7 @@
%include Example.h
+
+%extend Example {
+ ~Example() {}
+}