From 0dae847322814fccdfb4ebe36ab101eec20eac96 Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 8 Jul 2003 07:26:08 +0000 Subject: [PATCH] Use libtool. --- Makefile.in | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Makefile.in b/Makefile.in index e3aee96..37b1d66 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,9 +2,7 @@ CC = @CC@ DEFS = @DEFS@ LIBS = @LIBS@ -ldb -#CC = gcc CFLAGS = $(DEFS) -g -O2 -c -LINKER = $(CC) $(LIBS) -shared -o ## The default location for installation. Everything is placed in ## subdirectories of this directory. The default values for many of @@ -31,30 +29,29 @@ VERSION = @PACKAGE_VERSION@ RM = /bin/rm -f -all: libchise.so +all: libchise.la -libchise.so: chise.o - $(LINKER) libchise.so chise.o +libchise.la: chise.lo + libtool $(CC) -o libchise.la chise.lo $(LIBS) -rpath ${libdir} -chise.o: chise.c chise.h - $(CC) $(CFLAGS) chise.c +chise.lo: chise.c chise.h + libtool $(CC) $(CFLAGS) chise.c -install: install.h install.so install.db +install: install.h install.libs install.db install.h: install -c chise.h $(INCLUDE_INSTALLDIR) -install.so: libchise.so - install -c libchise.so $(LIB_INSTALLDIR)/libchise.so.$(VERSION) - (cd $(LIB_INSTALLDIR); ln -sf libchise.so.$(VERSION) libchise.so) +install.libs: libchise.la + libtool install -c libchise.la $(LIB_INSTALLDIR) install.db: -mkdir -p $(DB_INSTALLDIR) ln -sf `xemacs -q -batch -eval '(princ (file-name-as-directory exec-directory))'`char-db $(DB_INSTALLDIR) clean: - -$(RM) *.o *.so sample + -$(RM) -r *.o *.lo *.so *.la .libs sample sample: sample.c libchise.so -- 1.7.10.4