<?xml version="1.0" standalone="yes"?>
<project name="emulator-skin" basedir="." default="make-jar">
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
+ <condition property="isLinux">
+ <os family="unix" />
+ </condition>
+ <condition property="isMac">
+ <os family="mac" />
+ </condition>
+
<property name="jar.file" value="emulator-skin.jar" />
<property name="mainclass" value="org.tizen.emulator.skin.EmulatorSkinMain" />
<delete dir="build" />
</target>
- <target name="make-jar" depends="compile, create-jar" />
+ <target name="create-native-linux" if="isLinux">
+ <echo message="create native shared library on linux..." />
+ <javah classpath="build;lib/swt.jar" destdir="native_src">
+ <class name="org.tizen.emulator.skin.EmulatorSkin" />
+ </javah>
+ <exec dir="native_src" executable="gcc" failifexecutionfails="false">
+ <arg line="-shared" />
+ <arg line="-c" />
+ <arg line="Share.c" />
+ <arg line="-o" />
+ <arg line="libshare.so" />
+ <arg line="-I/usr/lib/jvm/jdk1.7.0_04/include" />
+ <arg line="-fPIC" />
+ </exec>
+ <delete>
+ <fileset dir="native_src" includes="**/*.h" />
+ </delete>
+ </target>
+
+ <target name="create-native-mac" if="isMac">
+ <echo message="create native shared library on mac..." />
+ <javah classpath="build;lib/swt.jar" destdir="native_src">
+ <class name="org.tizen.emulator.skin.EmulatorSkin" />
+ </javah>
+ <exec dir="native_src" executable="gcc" failifexecutionfails="false">
+ <arg line="-dynamiclib" />
+ <arg line="-c" />
+ <arg line="Share.c" />
+ <arg line="-o" />
+ <arg line="libshare.dylib" />
+ <arg line="-I/System/Library/Frameworks/JavaVM.framework/Headers" />
+ <arg line="-fPIC" />
+ </exec>
+ <delete>
+ <fileset dir="native_src" includes="**/*.h" />
+ </delete>
+ </target>
+
+ <target name="make-jar" depends="compile, create-native-linux, create-native-mac, create-jar" />
<!-- for dibs system... -->
<path id="classpath-dibs">
</javac>
</target>
- <target name="make-jar-dibs" depends="compile-dibs, create-jar" />
+ <target name="create-native-linux-dibs" if="isLinux">
+ <echo message="create native shared library on linux..." />
+ <javah classpath="build;lib/swt.jar" destdir="native_src">
+ <class name="org.tizen.emulator.skin.EmulatorSkin" />
+ </javah>
+ <exec dir="native_src" executable="gcc" failifexecutionfails="false">
+ <arg line="-shared" />
+ <arg line="-c" />
+ <arg line="Share.c" />
+ <arg line="-o" />
+ <arg line="libshare.so" />
+ <arg line="-I${include.path.jni}" />
+ <arg line="-fPIC" />
+ </exec>
+ <delete>
+ <fileset dir="native_src" includes="**/*.h" />
+ </delete>
+ </target>
+
+ <target name="create-native-mac-dibs" if="isMac">
+ <echo message="create native shared library on mac..." />
+ <javah classpath="build;lib/swt.jar" destdir="native_src">
+ <class name="org.tizen.emulator.skin.EmulatorSkin" />
+ </javah>
+ <exec dir="native_src" executable="gcc" failifexecutionfails="false">
+ <arg line="-dynamiclib" />
+ <arg line="-c" />
+ <arg line="Share.c" />
+ <arg line="-o" />
+ <arg line="libshare.dylib" />
+ <arg line="-I${include.path.jni}" />
+ <arg line="-fPIC" />
+ </exec>
+ <delete>
+ <fileset dir="native_src" includes="**/*.h" />
+ </delete>
+ </target>
+
+ <target name="make-jar-dibs" depends="compile-dibs, create-native-linux-dibs, create-native-mac-dibs, create-jar" />
</project>
+++ /dev/null
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_tizen_emulator_skin_EmulatorSkin */
-
-#ifndef _Included_org_tizen_emulator_skin_EmulatorSkin
-#define _Included_org_tizen_emulator_skin_EmulatorSkin
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef org_tizen_emulator_skin_EmulatorSkin_RED_MASK
-#define org_tizen_emulator_skin_EmulatorSkin_RED_MASK 16711680L
-#undef org_tizen_emulator_skin_EmulatorSkin_GREEN_MASK
-#define org_tizen_emulator_skin_EmulatorSkin_GREEN_MASK 65280L
-#undef org_tizen_emulator_skin_EmulatorSkin_BLUE_MASK
-#define org_tizen_emulator_skin_EmulatorSkin_BLUE_MASK 255L
-#undef org_tizen_emulator_skin_EmulatorSkin_COLOR_DEPTH
-#define org_tizen_emulator_skin_EmulatorSkin_COLOR_DEPTH 32L
-/*
- * Class: org_tizen_emulator_skin_EmulatorSkin
- * Method: shmget
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_shmget
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: org_tizen_emulator_skin_EmulatorSkin
- * Method: shmdt
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_shmdt
- (JNIEnv *, jobject);
-
-/*
- * Class: org_tizen_emulator_skin_EmulatorSkin
- * Method: getPixels
- * Signature: ([I)I
- */
-JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_getPixels
- (JNIEnv *, jobject, jintArray);
-
-#ifdef __cplusplus
-}
-#endif
-#endif