qse/ase/lib/awk/makefile.in

129 lines
3.1 KiB
Makefile
Raw Normal View History

#
# $Id: makefile.in,v 1.10 2007/10/15 16:15:42 bacon Exp $
#
NAME = aseawk
2008-06-07 04:33:44 +00:00
TOP_DIR = @abs_top_builddir@
TOP_INSTALLDIR = @prefix@/ase
CC = @CC@
CXX = @CXX@
2008-02-16 04:39:40 +00:00
AR = @AR@
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
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
MODE = @BUILDMODE@
CFLAGS_JNI = @CFLAGS_JNI@
2007-12-14 23:25:39 +00:00
BUILD_JNI = @BUILD_JNI@
2008-06-07 04:33:44 +00:00
LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
2008-06-07 04:33:44 +00:00
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
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
TMP_DIR = $(MODE)
TMP_DIR_CXX = $(TMP_DIR)/cxx
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
OBJ_FILES_JNI = $(TMP_DIR)/jni.o
OBJ_FILES_LIB_CXX = \
$(TMP_DIR)/cxx/Awk.o \
$(TMP_DIR)/cxx/StdAwk.o
OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo) $(OBJ_FILES_JNI:.o=.lo)
2008-06-10 00:49:17 +00:00
lib: build$(BUILD_JNI)
build: $(OUT_FILE_LIB) $(OUT_FILE_LIB_CXX)
buildjni: build $(OUT_FILE_JNI)
$(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
$(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
$(OUT_FILE_LIB_CXX): $(TMP_DIR_CXX) $(OUT_DIR) $(OUT_FILE_LIB) $(OBJ_FILES_LIB_CXX)
$(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
$(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
2008-06-07 04:33:44 +00:00
$(TMP_DIR)/cxx/Awk.o: Awk.cpp
$(CXX) $(CXXFLAGS) -o $@ -c Awk.cpp
2008-06-07 04:33:44 +00:00
$(TMP_DIR)/cxx/StdAwk.o: StdAwk.cpp
$(CXX) $(CXXFLAGS) -o $@ -c StdAwk.cpp
$(OUT_DIR):
mkdir -p $(OUT_DIR)
$(TMP_DIR):
mkdir -p $(TMP_DIR)
$(TMP_DIR_CXX): $(TMP_DIR)
mkdir -p $(TMP_DIR_CXX)
clean:
2008-06-10 00:49:17 +00:00
rm -rf $(OUT_FILE_LIB) $(OUT_FILE_JNI) $(OUT_FILE_LIB_CXX)
rm -rf $(OBJ_FILES_LIB) $(OBJ_FILES_JNI) $(OBJ_FILES_LIB_CXX)