$NetBSD: patch-aa,v 1.1.1.1 2008/08/09 21:22:11 bjs Exp $ --- src/Makefile.in.orig 2007-09-07 22:47:29.000000000 -0400 +++ src/Makefile.in @@ -4,7 +4,7 @@ #--------------------------------------------------------------------------- CC = @CC@ CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ +LDFLAGS = $(EXECLIBS) #----------------------------------------------------------------------------- # System library that contains functions for dynamic linking (-ldl) #----------------------------------------------------------------------------- @@ -22,7 +22,7 @@ ELF_DEP_LIBS = @ELF_DEP_LIBS@ # Set these values to ABSOLUTE path names #--------------------------------------------------------------------------- SRCDIR = @SRCDIR@# Location of sources -OBJDIR = @OBJDIR@# Location of objects +OBJDIR = .# Location of objects ELFDIR = @ELFDIR@# Location of elf objects VERSION_SCRIPT = $(SRCDIR)/slang.ver @@ -87,11 +87,11 @@ INSTALL_ELFLIB_TARGET = @INSTALL_ELFLIB_ CONFIG_H = config.h ALL_CFLAGS = $(CFLAGS) -Dunix $(THIS_LIB_DEFINES) ALL_ELF_CFLAGS = $(ELF_CFLAGS) -Dunix $(THIS_LIB_DEFINES) -COMPILE_CMD = $(CC) -c $(ALL_CFLAGS) +COMPILE_CMD = $(LIBTOOL) --mode=compile --tag=CC $(LIBTOOL_FLAGS) $(CC) -c $(ALL_CFLAGS) $(LIBTOOL_CFLAGS) ELFCOMPILE_CMD = $(ELF_CC) -c $(ALL_ELF_CFLAGS) ELF_LINK_CMD = $(ELF_LINK) -NORMAL_LIB = lib$(THIS_LIB).a +NORMAL_LIB = lib$(THIS_LIB)2.la OBJDIR_NORMAL_LIB = $(OBJDIR)/$(NORMAL_LIB) # On most systems, these variables have values of the form: @@ -136,14 +136,14 @@ UPDATE_VERSION_SCRIPT = $(HOME)/bin/upda #--------------------------------------------------------------------------- # Rules #--------------------------------------------------------------------------- -all: static elf -static: $(OBJDIR) $(CONFIG_H) $(OBJDIR_NORMAL_LIB) $(OTHERSTUFF) -elf: $(ELFDIR) $(CONFIG_H) $(ELFDIR_ELF_LIB) +all: $(OBJDIR) $(CONFIG_H) $(OBJDIR_NORMAL_LIB) +elf: all $(OBJDIR_NORMAL_LIB): $(OBJDIR) $(CONFIG_H) $(OBJS) - -$(RM) $(OBJDIR_NORMAL_LIB) - cd $(OBJDIR); $(AR_CR) $(NORMAL_LIB) $(OFILES) - $(RANLIB) $(OBJDIR_NORMAL_LIB) + cd $(OBJDIR); $(LIBTOOL) --mode=link $(LIBTOOL_FLAGS) \ + $(CC) -o $(NORMAL_LIB) $(OFILES:.o=.lo) \ + $(LIBTOOL_LDFLAGS) -rpath $(PREFIX)/lib \ + $(DL_LIB) -lm -ltermcap -version-info 2:1 @echo "" @echo $(NORMAL_LIB) created in $(OBJDIR) @@ -184,10 +184,9 @@ install-docs: $(DEST_DOCDIR) echo $(INSTALL_DATA) $$i $(DEST_DOCDIR)/; \ $(INSTALL_DATA) $$i $(DEST_DOCDIR)/; \ done -install-static: static install-headers install-docs $(DEST_LIBDIR) +install-static: all install-headers install-docs $(DEST_LIBDIR) @echo installing $(OBJDIR_NORMAL_LIB) in $(DEST_LIBDIR)/ - $(INSTALL_DATA) $(OBJDIR_NORMAL_LIB) $(DEST_LIBDIR)/ - $(RANLIB) $(DEST_LIBDIR)/$(NORMAL_LIB) + $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(OBJDIR_NORMAL_LIB) $(DEST_LIBDIR)/ install-elf-and-links: -$(RM) $(DEST_LIBDIR)/$(ELFLIB) -$(RM) $(DEST_LIBDIR)/$(ELFLIB_MAJOR) @@ -205,9 +204,9 @@ install-elf-cygwin: $(INSTALL_DATA) $(ELFDIR_DLL_LIB) $(DEST_LIBDIR)/ $(MKINSDIR) $(DEST_BINDIR) $(INSTALL) $(ELFDIR_ELF_LIB) $(DEST_BINDIR)/ -install-elf: elf install-headers install-docs $(DEST_LIBDIR) $(INSTALL_ELFLIB_TARGET) -install-all: install-elf install-static -install: install-all +install-elf: install-static +install-all: install-static +install: install-static #--------------------------------------------------------------------------- # Tests #---------------------------------------------------------------------------