summaryrefslogtreecommitdiff
path: root/Examples/android/class/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/android/class/Makefile')
-rw-r--r--Examples/android/class/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Examples/android/class/Makefile b/Examples/android/class/Makefile
new file mode 100644
index 000000000..7de95f559
--- /dev/null
+++ b/Examples/android/class/Makefile
@@ -0,0 +1,29 @@
+TOP = ../..
+SWIG = $(TOP)/../preinst-swig
+TARGET = example
+INTERFACE = example.i
+PACKAGEDIR = src/org/swig
+PACKAGENAME= org.swig.classexample
+SWIGOPT = -package $(PACKAGENAME) -outdir $(PACKAGEDIR)/classexample
+PROJECTNAME= SwigClass
+TARGETID = 1
+
+all:: android
+
+android::
+ android update project --target $(TARGETID) --name $(PROJECTNAME) --path .
+ $(SWIG) -c++ -java $(SWIGOPT) -o jni/$(TARGET)_wrap.cpp jni/$(INTERFACE)
+ ndk-build
+ ant debug
+
+install::
+ -adb uninstall $(PACKAGENAME)
+ adb install bin/$(PROJECTNAME)-debug.apk
+
+clean::
+ ant clean
+ rm -f jni/$(TARGET)_wrap.cpp
+ rm -f `find $(PACKAGEDIR) -name \*.java | grep -v $(PROJECTNAME).java`
+
+
+check: all