2007-05-02 01:07:00 +00:00
|
|
|
#
|
2007-11-12 18:04:00 +00:00
|
|
|
# $Id: makefile.in,v 1.6 2007/11/11 15:06:47 bacon Exp $
|
2007-05-02 01:07:00 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
CC = @CC@
|
2007-05-07 20:08:00 +00:00
|
|
|
CXX = @CXX@
|
2007-05-02 01:07:00 +00:00
|
|
|
CFLAGS = @CFLAGS@ -I@abs_top_builddir@/..
|
|
|
|
LDFLAGS = @LDFLAGS@ -L@abs_top_builddir@/@BUILDMODE@/lib
|
|
|
|
LIBS = @LIBS@ -laseawk -lasecmn -laseutl -lm
|
2007-05-07 20:08:00 +00:00
|
|
|
LIBS_CXX = -laseawk++ ${LIBS}
|
2007-05-02 01:07:00 +00:00
|
|
|
MODE = @BUILDMODE@
|
|
|
|
|
|
|
|
JAVAC = @JAVAC@
|
|
|
|
JAR = @JAR@
|
|
|
|
CFLAGS_JNI = @CFLAGS_JNI@
|
|
|
|
JNI = @JNI@
|
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
OUT_DIR= ../../$(MODE)
|
|
|
|
OUT_DIR_LIB = $(OUT_DIR)/lib
|
|
|
|
OUT_DIR_BIN = $(OUT_DIR)/bin
|
2007-05-02 01:07:00 +00:00
|
|
|
TMP_DIR = $(MODE)
|
|
|
|
|
|
|
|
ASEAWK_LIB =
|
|
|
|
|
|
|
|
all: build$(JNI)
|
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
build: $(TMP_DIR) $(OUT_DIR_BIN) $(OUT_DIR_BIN)/aseawk $(OUT_DIR_BIN)/aseawk_mini $(OUT_DIR_BIN)/aseawk++
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
buildjni: build $(OUT_DIR_BIN)/aseawk.jar $(OUT_DIR)/AseAwkApplet.html
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
$(OUT_DIR_BIN)/aseawk: awk.c
|
2007-05-02 01:07:00 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ awk.c $(LDFLAGS) $(LIBS)
|
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
$(OUT_DIR_BIN)/aseawk_mini: mini.c
|
2007-05-02 01:07:00 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ mini.c $(LDFLAGS) $(LIBS)
|
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
$(OUT_DIR_BIN)/aseawk++: Awk.cpp
|
2007-05-07 20:08:00 +00:00
|
|
|
$(CXX) $(CFLAGS) -o $@ Awk.cpp $(LDFLAGS) $(LIBS_CXX)
|
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
$(OUT_DIR_BIN)/aseawk.jar: $(TMP_DIR)/AseAwkPanel.class $(TMP_DIR)/AseAwk.class $(TMP_DIR)/AseAwkApplet.class
|
|
|
|
cd $(TMP_DIR); $(JAR) -xvf ../$(OUT_DIR_LIB)/aseawk.jar
|
2007-05-02 01:07:00 +00:00
|
|
|
cd $(TMP_DIR); $(JAR) -cvfm ../$@ ../manifest *.class ase
|
|
|
|
rm -rf $(TMP_DIR)/ase
|
|
|
|
|
|
|
|
$(TMP_DIR)/AseAwkPanel.class: AseAwkPanel.java
|
2007-11-12 18:04:00 +00:00
|
|
|
$(JAVAC) -classpath $(TMP_DIR):$(OUT_DIR_LIB)/aseawk.jar -d $(TMP_DIR) AseAwkPanel.java
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
$(TMP_DIR)/AseAwk.class: AseAwk.java
|
2007-11-12 18:04:00 +00:00
|
|
|
$(JAVAC) -classpath $(TMP_DIR):$(OUT_DIR_LIB)/aseawk.jar -d $(TMP_DIR) AseAwk.java
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
$(TMP_DIR)/AseAwkApplet.class: AseAwkApplet.java
|
2007-11-12 18:04:00 +00:00
|
|
|
$(JAVAC) -classpath $(TMP_DIR):$(OUT_DIR_LIB)/aseawk.jar -d $(TMP_DIR) AseAwkApplet.java
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
$(OUT_DIR)/AseAwkApplet.html: AseAwkApplet.html
|
|
|
|
cp -pf AseAwkApplet.html $(OUT_DIR)
|
|
|
|
|
2007-11-12 18:04:00 +00:00
|
|
|
$(OUT_DIR_BIN):
|
|
|
|
mkdir -p $(OUT_DIR_BIN)
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
$(TMP_DIR):
|
|
|
|
mkdir -p $(TMP_DIR)
|
|
|
|
|
|
|
|
clean:
|
2007-11-12 18:04:00 +00:00
|
|
|
rm -rf $(OUT_DIR_BIN)/aseawk $(OUT_DIR_BIN)/aseawk_mini $(OUT_DIR_BIN)/aseawk++ $(OUT_DIR_BIN)/aseawk.jar $(OUT_DIR)/AseAwkApplet.html $(TMP_DIR)/*.class
|
2007-05-02 01:07:00 +00:00
|
|
|
|