*** empty log message ***
This commit is contained in:
parent
353edc23bc
commit
4b12766a1c
@ -1,41 +0,0 @@
|
||||
OUT = aseawk
|
||||
|
||||
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
|
||||
JNI_SRCS = jni.c
|
||||
JAVA_SRCS = Exception.java Extio.java Awk.java StdAwk.java
|
||||
|
||||
C_OBJS = $(C_SRCS:.c=.o)
|
||||
JNI_OBJS = $(JNI_SRCS:.c=.o)
|
||||
JAVA_OBJS = $(JAVA_SRCS:.java=.class)
|
||||
|
||||
CC = gcc
|
||||
AR = ar
|
||||
LD = ld
|
||||
RANLIB = ranlib
|
||||
CFLAGS = -Wall -O2 -D_REENTRANT -D_THREAD_SAFE -I../..
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
|
||||
JAVAC = javac
|
||||
JAVACFLAGS = -classpath ../..
|
||||
|
||||
all: lib jni
|
||||
|
||||
lib: $(C_OBJS)
|
||||
$(AR) cr lib$(OUT).a $(C_OBJS)
|
||||
ranlib lib$(OUT).a
|
||||
|
||||
jni: lib $(JNI_OBJS) $(JAVA_OBJS)
|
||||
$(CC) -bundle -o $(OUT)_jni.so $(JNI_OBJS) -lm -L. -l$(OUT)
|
||||
|
||||
clean:
|
||||
rm -rf $(C_OBJS) $(JNI_OBJS) $(JAVA_OBJS) lib$(OUT).a lib$(OUT).so *.o
|
||||
|
||||
.SUFFIXES: .c .o .java .class
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
.java.class:
|
||||
$(JAVAC) $(JAVACFLAGS) $<
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<applet code="AseAwkApplet" archive="aseawk.jar" codebase="." codebase="../../.." width="200" height="200">
|
||||
<applet code="AseAwkApplet" archive="aseawk.jar" codebase="." width="640" height="480">
|
||||
</applet>
|
||||
|
||||
</body>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: AseAwkApplet.java,v 1.1 2007-04-10 08:01:34 bacon Exp $
|
||||
* $Id: AseAwkApplet.java,v 1.2 2007-04-11 09:39:46 bacon Exp $
|
||||
*/
|
||||
|
||||
import java.applet.*;
|
||||
@ -9,19 +9,62 @@ import java.net.URL;
|
||||
|
||||
public class AseAwkApplet extends Applet
|
||||
{
|
||||
private TextArea srcIn;
|
||||
private TextArea srcOut;
|
||||
private TextArea conIn;
|
||||
private TextArea conOut;
|
||||
private TextField jniLib;
|
||||
|
||||
public void init ()
|
||||
{
|
||||
Button btn_run;
|
||||
btn_run = new Button ("Run Awk");
|
||||
jniLib = new TextField ();
|
||||
|
||||
btn_run.addActionListener (new ActionListener ()
|
||||
srcIn = new TextArea ();
|
||||
srcOut = new TextArea ();
|
||||
conIn = new TextArea ();
|
||||
conOut = new TextArea ();
|
||||
|
||||
Button runBtn = new Button ("Run Awk");
|
||||
|
||||
runBtn.addActionListener (new ActionListener ()
|
||||
{
|
||||
public void actionPerformed (ActionEvent e)
|
||||
{
|
||||
run_awk ();
|
||||
}
|
||||
});
|
||||
add (btn_run);
|
||||
|
||||
Panel topPanel = new Panel ();
|
||||
BorderLayout topPanelLayout = new BorderLayout ();
|
||||
topPanel.setLayout (topPanelLayout);
|
||||
|
||||
topPanelLayout.setHgap (2);
|
||||
topPanelLayout.setVgap (2);
|
||||
topPanel.add (new Label ("JNI Library: "), BorderLayout.WEST);
|
||||
topPanel.add (jniLib, BorderLayout.CENTER);
|
||||
|
||||
Panel centerPanel = new Panel ();
|
||||
GridLayout centerPanelLayout = new GridLayout (2, 2);
|
||||
|
||||
centerPanel.setLayout (centerPanelLayout);
|
||||
|
||||
centerPanelLayout.setHgap (2);
|
||||
centerPanelLayout.setVgap (2);
|
||||
|
||||
centerPanel.add (srcIn);
|
||||
centerPanel.add (srcOut);
|
||||
centerPanel.add (conIn);
|
||||
centerPanel.add (conOut);
|
||||
|
||||
BorderLayout mainLayout = new BorderLayout ();
|
||||
mainLayout.setHgap (2);
|
||||
mainLayout.setVgap (2);
|
||||
|
||||
setLayout (mainLayout);
|
||||
|
||||
add (topPanel, BorderLayout.NORTH);
|
||||
add (centerPanel, BorderLayout.CENTER);
|
||||
add (runBtn, BorderLayout.SOUTH);
|
||||
}
|
||||
|
||||
public void stop () {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: makefile.in,v 1.20 2007-04-10 14:51:09 bacon Exp $
|
||||
# $Id: makefile.in,v 1.21 2007-04-11 09:39:46 bacon Exp $
|
||||
#
|
||||
|
||||
CC = @CC@
|
||||
@ -25,10 +25,10 @@ build: $(TMP_DIR) $(OUT_DIR)/aseawk $(OUT_DIR)/aseawk_mini
|
||||
|
||||
buildjni: $(TMP_DIR) build $(OUT_DIR)/aseawk.jar $(OUT_DIR)/AseAwkApplet.html
|
||||
|
||||
$(OUT_DIR)/aseawk: awk.c $(OUT_DIR)
|
||||
$(OUT_DIR)/aseawk: awk.c
|
||||
$(CC) $(CFLAGS) -o $@ awk.c $(LDFLAGS) $(LIBS)
|
||||
|
||||
$(OUT_DIR)/aseawk_mini: mini.c $(OUT_DIR)
|
||||
$(OUT_DIR)/aseawk_mini: mini.c
|
||||
$(CC) $(CFLAGS) -o $@ mini.c $(LDFLAGS) $(LIBS)
|
||||
|
||||
$(OUT_DIR)/aseawk.jar: $(TMP_DIR)/AseAwk.class $(TMP_DIR)/AseAwkApplet.class
|
||||
|
@ -1,25 +0,0 @@
|
||||
SRCS = awk.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -Wall -D_REENTRANT -D_THREAD_SAFE -fPIC -I../../..
|
||||
LDFLAGS = -L../../cmn -L../../awk -L../../utl
|
||||
LIBS = -lasecmn -laseawk -laseutl -lm
|
||||
|
||||
all: aseawk
|
||||
|
||||
aseawk: $(OBJS)
|
||||
$(CC) -o $@ awk.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
java:
|
||||
javac -classpath ../../.. Awk.java AwkApplet.java
|
||||
|
||||
jrun:
|
||||
java -Xms1m -Xmx2m -classpath ../../.. ase.test.awk.Awk
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.class aseawk
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $<
|
@ -1,26 +0,0 @@
|
||||
SRCS = awk.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -Wall -D_REENTRANT -D_THREAD_SAFE -I../../..
|
||||
LDFLAGS = -L../../cmn -L../../awk -L../../utl
|
||||
LIBS = -lasecmn -laseawk -laseutl -lm
|
||||
|
||||
|
||||
all: aseawk
|
||||
|
||||
aseawk: $(OBJS)
|
||||
$(CC) -o $@ awk.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
java:
|
||||
javac -classpath ../../.. Awk.java AwkApplet.java
|
||||
|
||||
jrun:
|
||||
java -classpath ../../.. ase.test.awk.Awk
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.class aseawk
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $<
|
Loading…
Reference in New Issue
Block a user