diff --git a/ase/awk/jni.c b/ase/awk/jni.c new file mode 100644 index 00000000..28d41d68 --- /dev/null +++ b/ase/awk/jni.c @@ -0,0 +1,17 @@ +/* + * $Id: jni.c,v 1.1 2006-08-02 15:03:48 bacon Exp $ + */ + +#include "jni.h" +#include "awk.h" +#include "sa.h" + +JNIEXPORT void JNICALL Java_AWK_open (JNIEnv* env, jobject obj) +{ + xp_printf (XP_T("Java_AWK_open\n")); +} + +JNIEXPORT void JNICALL Java_AWK_close (JNIEnv* env, jobject obj) +{ + xp_printf (XP_T("Java_AWK_close\n")); +} diff --git a/ase/awk/jni.def b/ase/awk/jni.def new file mode 100644 index 00000000..0603bfe4 --- /dev/null +++ b/ase/awk/jni.def @@ -0,0 +1,6 @@ +LIBRARY "xpawk.dll" + +EXPORTS + Java_AWK_open + Java_AWK_close + diff --git a/ase/awk/jni.h b/ase/awk/jni.h new file mode 100644 index 00000000..016bf88b --- /dev/null +++ b/ase/awk/jni.h @@ -0,0 +1,21 @@ +/* + * $Id: jni.h,v 1.1 2006-08-02 15:03:49 bacon Exp $ + */ + +#ifndef _XP_AWK_JNI_H_ +#define _XP_AWK_JNI_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +JNIEXPORT void JNICALL Java_AWK_open (JNIEnv*, jobject); +JNIEXPORT void JNICALL Java_AWK_close (JNIEnv*, jobject); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ase/awk/makefile.cl b/ase/awk/makefile.cl index 9505f956..a414bb92 100644 --- a/ase/awk/makefile.cl +++ b/ase/awk/makefile.cl @@ -4,7 +4,7 @@ OUT = xpawk CC = cl #CFLAGS = /nologo /MT /W3 /GR- /D_WIN32_WINNT=0x0400 -I../.. -CFLAGS = /nologo /O2 /MT /W3 /GR- /Za /D_WIN32_WINNT=0x0400 -I../.. -DXP_AWK_STAND_ALONE -DXP_CHAR_IS_WCHAR +CFLAGS = /nologo /O2 /MT /W3 /GR- /Za /D_WIN32_WINNT=0x0400 -I../.. -DXP_AWK_STAND_ALONE -DXP_CHAR_IS_WCHAR /I"C:\Program Files\IBM\Java141\Include" /I"C:\Program Files\IBM\Java141\Include\Win32" all: lib @@ -18,6 +18,11 @@ dll: $(OBJS) /nologo /out:$(OUT).dll $(OBJS) << +jni: $(OBJS) jni.obj + link /dll /def:jni.def /subsystem:console /version:0.1 /release @<< +/nologo /out:$(OUT).dll $(OBJS) jni.obj +<< + clean: del $(OBJS) $(OUT) *.obj