$NetBSD: patch-ac,v 1.5 2000/10/12 14:56:45 jlam Exp $ --- c++/Makefile.in.orig Thu Oct 12 04:52:50 2000 +++ c++/Makefile.in @@ -48,6 +48,8 @@ libdir = @libdir@ includedir = @includedir@ +LIBTOOL = @LIBTOOL@ + INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -64,6 +66,7 @@ CCFLAGS = $(CPPFLAGS) $(CXXFLAGS) +CFLAGS_LIBTOOL = $(CCFLAGS) CFLAGS_NORMAL = $(CCFLAGS) CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE CFLAGS_PROFILE = $(CCFLAGS) -pg @@ -71,25 +74,37 @@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) +NCURSES_MAJOR = @NCURSES_MAJOR@ +NCURSES_MINOR = @NCURSES_MINOR@ REL_VERSION = @cf_cv_rel_version@ ABI_VERSION = @cf_cv_abi_version@ -LINK = @LINK_PROGS@ $(CXX) @CXXLDFLAGS@ +LINK = @LINK_PROGS@ $(LIBTOOL) $(CXX) @CXXLDFLAGS@ + +LIBROOT = ncurses++ +LIBNAME = @LIB_PREFIX@$(LIBROOT)@DFT_DEP_SUFFIX@ + +LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la +LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a -LIBROOT = ncurses++@LIB_SUFFIX@ -LIBNAME = @LIB_PREFIX@$(LIBROOT).a +LINK_FLAGS = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) -l$(LIBROOT) -LDFLAGS = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) \ - -l$(LIBROOT) \ - @TEST_ARGS@ @LDFLAGS@ \ +LINK_LIBTOOL = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) ../lib/$(LIBNAME) +LINK_NORMAL = $(LINK_FLAGS) +LINK_DEBUG = $(LINK_FLAGS) +LINK_PROFILE = $(LINK_FLAGS) +LINK_SHARED = $(LINK_FLAGS) + +LDFLAGS = @TEST_ARGS@ @LDFLAGS@ \ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS) +LDFLAGS_LIBTOOL = $(LDFLAGS) LDFLAGS_NORMAL = $(LDFLAGS) LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@ LDFLAGS_PROFILE = $(LDFLAGS) -pg LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@ -LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) +LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@) AUTO_SRC = \ etip.h @@ -114,10 +129,15 @@ $(MODEL)/cursesapp.o \ $(MODEL)/cursesmain.o -../lib/$(LIBNAME) : $(LIB_OBJS) +../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS) $(AR) $(AR_OPTS) $@ $? $(RANLIB) $@ +../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS) + cd ../lib && $(LIBTOOL) $(CXX) -o $(LIBNAME) $(LIB_OBJS:.o=.lo) \ + -rpath $(INSTALL_PREFIX)$(libdir) \ + -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) + OBJS_DEMO = $(MODEL)/demo.o $(MODEL)/demo.o : $(srcdir)/demo.cc \ @@ -137,17 +157,17 @@ install \ install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir) - $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME) + $(LIBTOOL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME) uninstall \ uninstall.libs:: - -rm -f $(DESTDIR)$(libdir)/$(LIBNAME) + -$(LIBTOOL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME) mostlyclean :: -rm -f core tags TAGS *~ *.ln *.atac trace clean :: mostlyclean - -rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO) + -$(LIBTOOL) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(LIB_OBJS:.o=.lo) $(OBJS_DEMO) distclean :: clean -rm -f Makefile