*** empty log message ***
This commit is contained in:
parent
786b74fed6
commit
277e6d593f
@ -1,11 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: Awk.java,v 1.16 2007-01-18 13:49:27 bacon Exp $
|
* $Id: Awk.java,v 1.17 2007-01-18 14:34:17 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package ase.awk;
|
package ase.awk;
|
||||||
|
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
import java.security.PrivilegedAction;
|
import java.security.PrivilegedAction;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
public abstract class Awk
|
public abstract class Awk
|
||||||
{
|
{
|
||||||
@ -23,8 +24,10 @@ public abstract class Awk
|
|||||||
{
|
{
|
||||||
public Object run ()
|
public Object run ()
|
||||||
{
|
{
|
||||||
String dll = ase.awk.Awk.class.getResource("aseawk.dll").getFile();
|
URL url = ase.awk.Awk.class.getResource("aseawk.dll");
|
||||||
System.load (dll);
|
if (url == null) url = ase.awk.Awk.class.getResource("libaseawk.so");
|
||||||
|
|
||||||
|
if (url != null) System.load (url.getFile());
|
||||||
//System.load ("c://projects//ase/awk/aseawk.dll");
|
//System.load ("c://projects//ase/awk/aseawk.dll");
|
||||||
//System.loadLibrary ("aseawk");
|
//System.loadLibrary ("aseawk");
|
||||||
return null;
|
return null;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
OUT = libaseawk
|
OUT = aseawk
|
||||||
|
|
||||||
C_SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c \
|
C_SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c \
|
||||||
run.c rec.c val.c func.c misc.c extio.c rex.c
|
run.c rec.c val.c func.c misc.c extio.c rex.c
|
||||||
@ -17,7 +17,7 @@ CC = gcc
|
|||||||
AR = ar
|
AR = ar
|
||||||
LD = ld
|
LD = ld
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
CFLAGS = -Wall -O2 -D_REENTRANT -D_THREAD_SAFE -fPIC -I../.. $(JNI_INCPATH)
|
CFLAGS = -Wall -O2 -D_REENTRANT -D_THREAD_SAFE -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -I../.. $(JNI_INCPATH)
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|
||||||
@ -27,13 +27,16 @@ JAVACFLAGS = -classpath ../..
|
|||||||
all: lib jni
|
all: lib jni
|
||||||
|
|
||||||
lib: $(C_OBJS)
|
lib: $(C_OBJS)
|
||||||
$(AR) cr $(OUT).a $(C_OBJS)
|
$(AR) cr lib$(OUT).a $(C_OBJS)
|
||||||
|
|
||||||
jni: lib $(JNI_OBJS) $(JAVA_OBJS)
|
jni: lib $(JNI_OBJS) $(JAVA_OBJS)
|
||||||
$(LD) -fPIC -shared -soname $(OUT).so -o $(OUT).so -L . -l aseawk jni.o
|
$(CC) -shared -o lib$(OUT)_jni.so $(JNI_OBJS) -lm -L. -l$(OUT)
|
||||||
|
|
||||||
|
#$(CC) -fPIC -shared -static-libgcc -o lib$(OUT)_jni.so -L. -laseawk -lm libaseawk.a jni.o
|
||||||
|
#$(LD) -fPIC -shared -soname lib$(OUT).so -o lib$(OUT).so -L . -l aseawk jni.o
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(C_OBJS) $(JNI_OBJS) $(JAVA_OBJS) $(OUT).a $(OUT).so *.o
|
rm -rf $(C_OBJS) $(JNI_OBJS) $(JAVA_OBJS) lib$(OUT).a lib$(OUT).so *.o
|
||||||
|
|
||||||
.SUFFIXES: .c .o .java .class
|
.SUFFIXES: .c .o .java .class
|
||||||
.c.o:
|
.c.o:
|
||||||
|
Loading…
Reference in New Issue
Block a user