77 lines
1.6 KiB
Makefile
77 lines
1.6 KiB
Makefile
#
|
|
# $Id: makefile.in,v 1.3 2007/04/30 05:55:36 bacon Exp $
|
|
#
|
|
|
|
NAME = asecmn
|
|
|
|
TOP_DIR = @abs_top_builddir@
|
|
|
|
PREFIX = @prefix@
|
|
LIBDIR = $(PREFIX)/lib
|
|
|
|
CC = @CC@
|
|
AR = @AR@
|
|
MAKE = @MAKE@
|
|
RANLIB = @RANLIB@
|
|
CFLAGS = @CFLAGS@ -I$(TOP_DIR)/inc
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBS = @LIBS@
|
|
MODE = @BUILDMODE@
|
|
|
|
LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
|
|
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
|
|
|
|
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
|
|
OUT_FILE = $(OUT_DIR)/lib$(NAME).la
|
|
|
|
TMP_DIR = $(MODE)
|
|
|
|
OBJ_FILES = \
|
|
$(TMP_DIR)/mem.o \
|
|
$(TMP_DIR)/str_bas.o \
|
|
$(TMP_DIR)/str_cnv.o \
|
|
$(TMP_DIR)/str_dyn.o \
|
|
$(TMP_DIR)/map.o \
|
|
$(TMP_DIR)/rex.o \
|
|
$(TMP_DIR)/misc.o
|
|
|
|
OBJ_FILES_SO = $(OBJ_FILES:.o=.lo)
|
|
|
|
lib: $(OUT_FILE)
|
|
|
|
$(OUT_FILE): $(TMP_DIR) $(OBJ_FILES) $(OUT_DIR)
|
|
#$(AR) cr $(OUT_FILE) $(OBJ_FILES)
|
|
$(LIBTOOL_LINK) $(CC) -rpath $(LIBDIR) -version-info 1:0:0 -o $@ $(OBJ_FILES_SO) -L$(OUT_DIR)
|
|
#[ -n "$(RANLIB)" ] && $(RANLIB) $(OUT_FILE)
|
|
|
|
$(TMP_DIR)/mem.o: mem.c
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c mem.c
|
|
|
|
$(TMP_DIR)/str_bas.o: str_bas.c
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c str_bas.c
|
|
|
|
$(TMP_DIR)/str_cnv.o: str_cnv.c
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c str_cnv.c
|
|
|
|
$(TMP_DIR)/str_dyn.o: str_dyn.c
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c str_dyn.c
|
|
|
|
$(TMP_DIR)/map.o: map.c
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c map.c
|
|
|
|
$(TMP_DIR)/rex.o: rex.c
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c rex.c
|
|
|
|
$(TMP_DIR)/misc.o: misc.c
|
|
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c misc.c
|
|
|
|
$(OUT_DIR):
|
|
mkdir -p $(OUT_DIR)
|
|
|
|
$(TMP_DIR):
|
|
mkdir -p $(TMP_DIR)
|
|
|
|
clean:
|
|
rm -rf $(OUT_FILE) $(OBJ_FILES) $(OBJ_FILES_SO)
|
|
|