2007-05-02 01:07:00 +00:00
|
|
|
#
|
2007-10-17 00:30:00 +00:00
|
|
|
# $Id: makefile.in,v 1.10 2007/10/15 16:15:42 bacon Exp $
|
2007-05-02 01:07:00 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
NAME = aseawk
|
|
|
|
|
2008-06-07 04:33:44 +00:00
|
|
|
TOP_DIR = @abs_top_builddir@
|
2007-05-02 01:07:00 +00:00
|
|
|
TOP_INSTALLDIR = @prefix@/ase
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
CXX = @CXX@
|
2008-02-16 04:39:40 +00:00
|
|
|
AR = @AR@
|
2007-05-02 01:07:00 +00:00
|
|
|
RANLIB = @RANLIB@
|
2008-02-16 08:35:40 +00:00
|
|
|
|
2008-06-07 04:33:44 +00:00
|
|
|
CFLAGS = @CFLAGS@ -I$(TOP_DIR)/inc
|
|
|
|
CXXFLAGS = @CXXFLAGS@ -I$(TOP_DIR)/inc
|
2007-05-02 01:07:00 +00:00
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
LIBS = @LIBS@
|
|
|
|
MODE = @BUILDMODE@
|
|
|
|
|
2007-12-14 08:15:05 +00:00
|
|
|
CJ = @CJ@
|
2008-06-07 04:35:52 +00:00
|
|
|
CJFLAGS = @CJFLAGS@ --classpath=$(TOP_DIR)/lib -fjni
|
2007-12-14 23:25:39 +00:00
|
|
|
BUILD_CJ = @BUILD_CJ@
|
2007-12-14 08:15:05 +00:00
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
JAVAC = @JAVAC@
|
|
|
|
JAR = @JAR@
|
|
|
|
CFLAGS_JNI = @CFLAGS_JNI@
|
2007-12-14 23:25:39 +00:00
|
|
|
BUILD_JNI = @BUILD_JNI@
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-06-07 04:33:44 +00:00
|
|
|
LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
|
|
|
|
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-06-07 04:33:44 +00:00
|
|
|
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
|
2007-05-02 01:07:00 +00:00
|
|
|
OUT_FILE_LIB = $(OUT_DIR)/lib$(NAME).a
|
|
|
|
OUT_FILE_JNI = $(OUT_DIR)/lib$(NAME)_jni.la
|
|
|
|
OUT_FILE_LIB_CXX = $(OUT_DIR)/lib$(NAME)++.a
|
2007-12-14 08:15:05 +00:00
|
|
|
OUT_FILE_LIB_CJ = $(OUT_DIR)/lib$(NAME)ja.a
|
2007-05-02 01:07:00 +00:00
|
|
|
OUT_FILE_JAR = $(OUT_DIR)/$(NAME).jar
|
|
|
|
|
|
|
|
TMP_DIR = $(MODE)
|
|
|
|
TMP_DIR_CXX = $(TMP_DIR)/cxx
|
2007-12-14 08:15:05 +00:00
|
|
|
TMP_DIR_CJ = $(TMP_DIR)/cj
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
OBJ_FILES_LIB = \
|
|
|
|
$(TMP_DIR)/awk.o \
|
|
|
|
$(TMP_DIR)/err.o \
|
|
|
|
$(TMP_DIR)/tree.o \
|
|
|
|
$(TMP_DIR)/tab.o \
|
|
|
|
$(TMP_DIR)/parse.o \
|
|
|
|
$(TMP_DIR)/run.o \
|
|
|
|
$(TMP_DIR)/rec.o \
|
|
|
|
$(TMP_DIR)/val.o \
|
|
|
|
$(TMP_DIR)/func.o \
|
|
|
|
$(TMP_DIR)/misc.o \
|
2008-03-04 03:31:41 +00:00
|
|
|
$(TMP_DIR)/extio.o
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
OBJ_FILES_JNI = $(TMP_DIR)/jni.o
|
|
|
|
|
2007-05-07 01:05:00 +00:00
|
|
|
OBJ_FILES_LIB_CXX = \
|
|
|
|
$(TMP_DIR)/cxx/Awk.o \
|
|
|
|
$(TMP_DIR)/cxx/StdAwk.o
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2007-12-14 08:15:05 +00:00
|
|
|
OBJ_FILES_LIB_CJ = \
|
|
|
|
$(TMP_DIR)/cj/Awk.o \
|
2007-12-14 23:25:39 +00:00
|
|
|
$(TMP_DIR)/cj/StdAwk.o \
|
|
|
|
$(TMP_DIR)/cj/Context.o \
|
|
|
|
$(TMP_DIR)/cj/Extio.o \
|
|
|
|
$(TMP_DIR)/cj/IO.o \
|
|
|
|
$(TMP_DIR)/cj/Console.o \
|
|
|
|
$(TMP_DIR)/cj/File.o \
|
|
|
|
$(TMP_DIR)/cj/Pipe.o \
|
|
|
|
$(TMP_DIR)/cj/Exception.o \
|
|
|
|
$(TMP_DIR)/cj/Return.o \
|
|
|
|
$(TMP_DIR)/cj/Argument.o \
|
|
|
|
$(TMP_DIR)/cj/Clearable.o
|
2007-12-14 08:15:05 +00:00
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo) $(OBJ_FILES_JNI:.o=.lo)
|
|
|
|
|
|
|
|
OBJ_FILES_JAR = \
|
|
|
|
$(TMP_DIR)/ase/awk/Awk.class \
|
|
|
|
$(TMP_DIR)/ase/awk/StdAwk.class \
|
2007-10-17 00:30:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Context.class \
|
2007-05-02 01:07:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Extio.class \
|
2007-10-13 23:34:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/IO.class \
|
|
|
|
$(TMP_DIR)/ase/awk/Console.class \
|
|
|
|
$(TMP_DIR)/ase/awk/File.class \
|
|
|
|
$(TMP_DIR)/ase/awk/Pipe.class \
|
2007-12-14 08:15:05 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Exception.class \
|
|
|
|
$(TMP_DIR)/ase/awk/Return.class \
|
2007-12-14 23:25:39 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Argument.class \
|
|
|
|
$(TMP_DIR)/ase/awk/Clearable.class
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2007-12-14 23:25:39 +00:00
|
|
|
lib: build$(BUILD_JNI)$(BUILD_CJ)
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
build: $(OUT_FILE_LIB) $(OUT_FILE_LIB_CXX)
|
|
|
|
|
2007-12-14 23:25:39 +00:00
|
|
|
buildjnicj: buildjni buildcj
|
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
buildjni: build $(OUT_FILE_JNI)
|
|
|
|
|
2007-12-14 23:25:39 +00:00
|
|
|
buildcj: build $(OUT_FILE_LIB_CJ)
|
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
|
|
|
|
$(AR) cr $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
|
2008-02-16 08:35:40 +00:00
|
|
|
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE_LIB); fi
|
2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
$(OUT_FILE_JNI): $(TMP_DIR) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OUT_FILE_LIB)
|
|
|
|
$(LIBTOOL_LINK) $(CC) -rpath $(TOP_INSTALLDIR)/lib -version-info 1:0:0 -o $(OUT_FILE_JNI) $(OBJ_FILES_SO) -lm -L$(OUT_DIR) -l$(NAME) -lasecmn -laseutl
|
|
|
|
$(JAR) -Mcvf $(OUT_FILE_JAR) -C $(TMP_DIR) ase
|
|
|
|
|
2007-05-04 00:14:00 +00:00
|
|
|
$(OUT_FILE_LIB_CXX): $(TMP_DIR_CXX) $(OUT_DIR) $(OUT_FILE_LIB) $(OBJ_FILES_LIB_CXX)
|
2007-05-02 01:07:00 +00:00
|
|
|
$(AR) cr $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB_CXX)
|
2008-02-16 08:35:40 +00:00
|
|
|
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE_LIB_CXX); fi
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2007-12-14 08:15:05 +00:00
|
|
|
$(OUT_FILE_LIB_CJ): $(TMP_DIR_CJ) $(OUT_DIR) $(OBJ_FILES_LIB_CJ)
|
|
|
|
$(AR) cr $(OUT_FILE_LIB_CJ) $(OBJ_FILES_LIB_CJ)
|
2008-02-16 08:35:40 +00:00
|
|
|
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE_LIB_CJ); fi
|
2007-12-14 08:15:05 +00:00
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
$(TMP_DIR)/awk.o: awk.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c awk.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/err.o: err.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c err.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/tree.o: tree.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c tree.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/tab.o: tab.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c tab.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/parse.o: parse.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c parse.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/run.o: run.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c run.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/rec.o: rec.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c rec.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/val.o: val.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c val.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/func.o: func.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c func.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/misc.o: misc.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c misc.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/extio.o: extio.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c extio.c
|
|
|
|
|
|
|
|
$(TMP_DIR)/jni.o: jni.c
|
|
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) $(CFLAGS_JNI) -o $@ -c jni.c
|
|
|
|
|
2007-05-26 21:41:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Awk.class: Awk.java
|
2007-05-02 01:07:00 +00:00
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Awk.java
|
|
|
|
|
2007-05-26 21:41:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/StdAwk.class: StdAwk.java
|
2007-05-02 01:07:00 +00:00
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) StdAwk.java
|
|
|
|
|
2007-10-17 00:30:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Context.class: Context.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Context.java
|
|
|
|
|
2007-05-26 21:41:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Extio.class: Extio.java
|
2007-05-02 01:07:00 +00:00
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Extio.java
|
|
|
|
|
2007-05-29 00:42:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/IO.class: IO.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) IO.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/ase/awk/Console.class: Console.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Console.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/ase/awk/File.class: File.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) File.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/ase/awk/Pipe.class: Pipe.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Pipe.java
|
|
|
|
|
2007-05-26 21:41:00 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Exception.class: Exception.java
|
2007-05-02 01:07:00 +00:00
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Exception.java
|
|
|
|
|
2007-12-14 08:15:05 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Return.class: Return.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Return.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/ase/awk/Argument.class: Argument.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Argument.java
|
|
|
|
|
2007-12-14 23:25:39 +00:00
|
|
|
$(TMP_DIR)/ase/awk/Clearable.class: Clearable.java
|
|
|
|
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Clearable.java
|
|
|
|
|
2008-06-07 04:33:44 +00:00
|
|
|
$(TMP_DIR)/cxx/Awk.o: Awk.cpp
|
2007-05-02 01:07:00 +00:00
|
|
|
$(CXX) $(CXXFLAGS) -o $@ -c Awk.cpp
|
|
|
|
|
2008-06-07 04:33:44 +00:00
|
|
|
$(TMP_DIR)/cxx/StdAwk.o: StdAwk.cpp
|
2007-05-07 01:05:00 +00:00
|
|
|
$(CXX) $(CXXFLAGS) -o $@ -c StdAwk.cpp
|
|
|
|
|
2007-12-14 08:15:05 +00:00
|
|
|
$(TMP_DIR)/cj/Awk.o: Awk.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Awk.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/StdAwk.o: StdAwk.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c StdAwk.java
|
|
|
|
|
2007-12-14 23:25:39 +00:00
|
|
|
$(TMP_DIR)/cj/Context.o: Context.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Context.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/Extio.o: Extio.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Extio.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/IO.o: IO.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c IO.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/Console.o: Console.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Console.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/File.o: File.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c File.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/Pipe.o: Pipe.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Pipe.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/Exception.o: Exception.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Exception.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/Return.o: Return.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Return.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/Argument.o: Argument.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Argument.java
|
|
|
|
|
|
|
|
$(TMP_DIR)/cj/Clearable.o: Clearable.java
|
|
|
|
$(CJ) $(CJFLAGS) -o $@ -c Clearable.java
|
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
$(OUT_DIR):
|
|
|
|
mkdir -p $(OUT_DIR)
|
|
|
|
|
|
|
|
$(TMP_DIR):
|
|
|
|
mkdir -p $(TMP_DIR)
|
|
|
|
|
|
|
|
$(TMP_DIR_CXX): $(TMP_DIR)
|
2007-10-14 02:25:00 +00:00
|
|
|
mkdir -p $(TMP_DIR_CXX)
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2007-12-14 08:15:05 +00:00
|
|
|
$(TMP_DIR_CJ): $(TMP_DIR)
|
|
|
|
mkdir -p $(TMP_DIR_CJ)
|
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
clean:
|
2007-12-14 23:25:39 +00:00
|
|
|
rm -rf $(OUT_FILE_LIB) $(OUT_FILE_JNI) $(OUT_FILE_JAR) $(OUT_FILE_LIB_CXX) $(OUT_FILE_LIB_CJ)
|
|
|
|
rm -rf $(OBJ_FILES_LIB) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OBJ_FILES_LIB_CXX) $(OBJ_FILES_LIB_CJ)
|
2007-05-02 01:07:00 +00:00
|
|
|
|