This commit is contained in:
parent
51015d8f84
commit
62daaaa340
@ -14,8 +14,10 @@ LIBS_CXX = -laseawk++ ${LIBS}
|
|||||||
MODE = @BUILDMODE@
|
MODE = @BUILDMODE@
|
||||||
|
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
|
AR = @AR@
|
||||||
|
|
||||||
AR = ar
|
LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
|
||||||
|
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
|
||||||
|
|
||||||
OUT_DIR= $(TOP_DIR)/out/$(MODE)
|
OUT_DIR= $(TOP_DIR)/out/$(MODE)
|
||||||
OUT_DIR_LIB = $(OUT_DIR)/lib
|
OUT_DIR_LIB = $(OUT_DIR)/lib
|
||||||
@ -29,11 +31,11 @@ all: build
|
|||||||
build: $(TMP_DIR) $(OUT_DIR_BIN) $(OUT_DIR_BIN)/aseawk $(OUT_DIR_BIN)/aseawk++
|
build: $(TMP_DIR) $(OUT_DIR_BIN) $(OUT_DIR_BIN)/aseawk $(OUT_DIR_BIN)/aseawk++
|
||||||
|
|
||||||
$(OUT_DIR_BIN)/aseawk: awk.c
|
$(OUT_DIR_BIN)/aseawk: awk.c
|
||||||
$(CC) $(CFLAGS) -o $@ awk.c $(LDFLAGS) $(LIBS)
|
$(LIBTOOL_LINK) $(CC) $(CFLAGS) -o $@ awk.c $(LDFLAGS) $(LIBS)
|
||||||
$(STRIP) $@
|
$(STRIP) $@
|
||||||
|
|
||||||
$(OUT_DIR_BIN)/aseawk++: Awk.cpp
|
$(OUT_DIR_BIN)/aseawk++: Awk.cpp
|
||||||
$(CXX) $(CXXFLAGS) -o $@ Awk.cpp $(LDFLAGS) $(LIBS_CXX)
|
$(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) -o $@ Awk.cpp $(LDFLAGS) $(LIBS_CXX)
|
||||||
$(STRIP) $@
|
$(STRIP) $@
|
||||||
|
|
||||||
$(OUT_DIR_BIN):
|
$(OUT_DIR_BIN):
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
NAME = aseawk
|
NAME = aseawk
|
||||||
|
|
||||||
TOP_DIR = @abs_top_builddir@
|
TOP_DIR = @abs_top_builddir@
|
||||||
TOP_INSTALLDIR = @prefix@/ase
|
|
||||||
|
PREFIX = @prefix@
|
||||||
|
LIBDIR = $(PREFIX)/lib
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
@ -25,9 +27,9 @@ LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
|
|||||||
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
|
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
|
||||||
|
|
||||||
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
|
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
|
||||||
OUT_FILE_LIB = $(OUT_DIR)/lib$(NAME).a
|
OUT_FILE_LIB = $(OUT_DIR)/lib$(NAME).la
|
||||||
OUT_FILE_JNI = $(OUT_DIR)/lib$(NAME)_jni.la
|
OUT_FILE_JNI = $(OUT_DIR)/lib$(NAME)_jni.la
|
||||||
OUT_FILE_LIB_CXX = $(OUT_DIR)/lib$(NAME)++.a
|
OUT_FILE_LIB_CXX = $(OUT_DIR)/lib$(NAME)++.la
|
||||||
|
|
||||||
TMP_DIR = $(MODE)
|
TMP_DIR = $(MODE)
|
||||||
TMP_DIR_CXX = $(TMP_DIR)/cxx
|
TMP_DIR_CXX = $(TMP_DIR)/cxx
|
||||||
@ -51,7 +53,8 @@ OBJ_FILES_LIB_CXX = \
|
|||||||
$(TMP_DIR)/cxx/Awk.o \
|
$(TMP_DIR)/cxx/Awk.o \
|
||||||
$(TMP_DIR)/cxx/StdAwk.o
|
$(TMP_DIR)/cxx/StdAwk.o
|
||||||
|
|
||||||
OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo) $(OBJ_FILES_JNI:.o=.lo)
|
#OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo) $(OBJ_FILES_JNI:.o=.lo)
|
||||||
|
OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo)
|
||||||
|
|
||||||
lib: build$(BUILD_JNI)
|
lib: build$(BUILD_JNI)
|
||||||
|
|
||||||
@ -60,16 +63,18 @@ build: $(OUT_FILE_LIB) $(OUT_FILE_LIB_CXX)
|
|||||||
buildjni: build $(OUT_FILE_JNI)
|
buildjni: build $(OUT_FILE_JNI)
|
||||||
|
|
||||||
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
|
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
|
||||||
$(AR) cr $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
|
#$(AR) cr $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
|
||||||
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE_LIB); fi
|
$(LIBTOOL_LINK) $(CC) -rpath $(LIBDIR) -version-info 1:0:0 -o $@ $(OBJ_FILES_SO) -L$(OUT_DIR) -lasecmn
|
||||||
|
#[ ! -z "$(RANLIB)" ] && $(RANLIB) $(OUT_FILE_LIB)
|
||||||
|
|
||||||
$(OUT_FILE_JNI): $(TMP_DIR) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OUT_FILE_LIB)
|
$(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
|
$(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
|
$(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)
|
$(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)
|
#$(AR) cr $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB_CXX)
|
||||||
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE_LIB_CXX); fi
|
$(LIBTOOL_LINK) $(CC) -rpath $(LIBDIR) -version-info 1:0:0 -o $@ $(OBJ_FILES_SO) -L$(OUT_DIR) -laseawk -lasecmn
|
||||||
|
#[ ! -z "$(RANLIB)" ] && $(RANLIB) $(OUT_FILE_LIB_CXX)
|
||||||
|
|
||||||
$(TMP_DIR)/awk.o: awk.c
|
$(TMP_DIR)/awk.o: awk.c
|
||||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c awk.c
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c awk.c
|
||||||
|
Loading…
Reference in New Issue
Block a user