This commit is contained in:
hyung-hwan 2008-06-10 04:23:38 +00:00
parent 2a01d601fb
commit 51015d8f84
2 changed files with 38 additions and 22 deletions

View File

@ -6,6 +6,9 @@ NAME = asecmn
TOP_DIR = @abs_top_builddir@ TOP_DIR = @abs_top_builddir@
PREFIX = @prefix@
LIBDIR = $(PREFIX)/lib
CC = @CC@ CC = @CC@
AR = @AR@ AR = @AR@
MAKE = @MAKE@ MAKE = @MAKE@
@ -15,8 +18,11 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
MODE = @BUILDMODE@ MODE = @BUILDMODE@
LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
OUT_FILE = $(OUT_DIR)/lib$(NAME).a OUT_FILE = $(OUT_DIR)/lib$(NAME).la
TMP_DIR = $(MODE) TMP_DIR = $(MODE)
@ -29,32 +35,35 @@ OBJ_FILES = \
$(TMP_DIR)/rex.o \ $(TMP_DIR)/rex.o \
$(TMP_DIR)/misc.o $(TMP_DIR)/misc.o
OBJ_FILES_SO = $(OBJ_FILES:.o=.lo)
lib: $(OUT_FILE) lib: $(OUT_FILE)
$(OUT_FILE): $(TMP_DIR) $(OBJ_FILES) $(OUT_DIR) $(OUT_FILE): $(TMP_DIR) $(OBJ_FILES) $(OUT_DIR)
$(AR) cr $(OUT_FILE) $(OBJ_FILES) #$(AR) cr $(OUT_FILE) $(OBJ_FILES)
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE); fi $(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 $(TMP_DIR)/mem.o: mem.c
$(CC) $(CFLAGS) -o $@ -c mem.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c mem.c
$(TMP_DIR)/str_bas.o: str_bas.c $(TMP_DIR)/str_bas.o: str_bas.c
$(CC) $(CFLAGS) -o $@ -c str_bas.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c str_bas.c
$(TMP_DIR)/str_cnv.o: str_cnv.c $(TMP_DIR)/str_cnv.o: str_cnv.c
$(CC) $(CFLAGS) -o $@ -c str_cnv.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c str_cnv.c
$(TMP_DIR)/str_dyn.o: str_dyn.c $(TMP_DIR)/str_dyn.o: str_dyn.c
$(CC) $(CFLAGS) -o $@ -c str_dyn.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c str_dyn.c
$(TMP_DIR)/map.o: map.c $(TMP_DIR)/map.o: map.c
$(CC) $(CFLAGS) -o $@ -c map.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c map.c
$(TMP_DIR)/rex.o: rex.c $(TMP_DIR)/rex.o: rex.c
$(CC) $(CFLAGS) -o $@ -c rex.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c rex.c
$(TMP_DIR)/misc.o: misc.c $(TMP_DIR)/misc.o: misc.c
$(CC) $(CFLAGS) -o $@ -c misc.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c misc.c
$(OUT_DIR): $(OUT_DIR):
mkdir -p $(OUT_DIR) mkdir -p $(OUT_DIR)
@ -63,5 +72,5 @@ $(TMP_DIR):
mkdir -p $(TMP_DIR) mkdir -p $(TMP_DIR)
clean: clean:
rm -rf $(OUT_FILE) $(OBJ_FILES) rm -rf $(OUT_FILE) $(OBJ_FILES) $(OBJ_FILES_SO)

View File

@ -6,6 +6,9 @@ NAME = aseutl
TOP_DIR = @abs_top_builddir@ TOP_DIR = @abs_top_builddir@
PREFIX = @prefix@
LIBDIR = $(PREFIX)/lib
CC = @CC@ CC = @CC@
AR = @AR@ AR = @AR@
MAKE = @MAKE@ MAKE = @MAKE@
@ -15,8 +18,11 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
MODE = @BUILDMODE@ MODE = @BUILDMODE@
LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib OUT_DIR = $(TOP_DIR)/out/$(MODE)/lib
OUT_FILE = $(OUT_DIR)/lib$(NAME).a OUT_FILE = $(OUT_DIR)/lib$(NAME).la
TMP_DIR = $(MODE) TMP_DIR = $(MODE)
@ -28,29 +34,30 @@ OBJ_FILES = \
$(TMP_DIR)/getopt.o \ $(TMP_DIR)/getopt.o \
$(TMP_DIR)/assert.o $(TMP_DIR)/assert.o
OBJ_FILES_SO = $(OBJ_FILES:.o=.lo)
lib: $(OUT_FILE) lib: $(OUT_FILE)
$(OUT_FILE): $(TMP_DIR) $(OBJ_FILES) $(OUT_DIR) $(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)
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE); fi
$(TMP_DIR)/main.o: main.c $(TMP_DIR)/main.o: main.c
$(CC) $(CFLAGS) -o $@ -c main.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c main.c
$(TMP_DIR)/ctype.o: ctype.c $(TMP_DIR)/ctype.o: ctype.c
$(CC) $(CFLAGS) -o $@ -c ctype.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c ctype.c
$(TMP_DIR)/stdio.o: stdio.c $(TMP_DIR)/stdio.o: stdio.c
$(CC) $(CFLAGS) -o $@ -c stdio.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c stdio.c
$(TMP_DIR)/http.o: http.c $(TMP_DIR)/http.o: http.c
$(CC) $(CFLAGS) -o $@ -c http.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c http.c
$(TMP_DIR)/getopt.o: getopt.c $(TMP_DIR)/getopt.o: getopt.c
$(CC) $(CFLAGS) -o $@ -c getopt.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c getopt.c
$(TMP_DIR)/assert.o: assert.c $(TMP_DIR)/assert.o: assert.c
$(CC) $(CFLAGS) -o $@ -c assert.c $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c assert.c
$(OUT_DIR): $(OUT_DIR):
mkdir -p $(OUT_DIR) mkdir -p $(OUT_DIR)
@ -59,5 +66,5 @@ $(TMP_DIR):
mkdir -p $(TMP_DIR) mkdir -p $(TMP_DIR)
clean: clean:
rm -rf $(OUT_FILE) $(OBJ_FILES) rm -rf $(OUT_FILE) $(OBJ_FILES) $(OBJ_FILES_SO)