$NetBSD: patch-ab,v 1.3 2000/08/14 07:27:39 tron Exp $ --- libGL/Makefile.in.orig Sat Jun 3 10:16:36 2000 +++ libGL/Makefile.in Sun Aug 13 23:46:13 2000 @@ -14,7 +14,7 @@ # These define the name/version of the shared library we're building # ------------------------------------------------------------------ LIBNAME = GL -SOGLREV = 1.0 +SOGLREV = 3:0 # Source and Object files # ----------------------- @@ -23,7 +23,6 @@ map_points.c pointers.c glx_varray.c direct_protocol.c OBJS = ${SRCS:.c=.o} -UNSHARED_OBJS = unshared/*.o # Additional compiler rules @@ -50,22 +49,12 @@ ${CC} ${ALL_CFLAGS} -E $*.c > $@ .c.o: -ifeq "${USE_DYNAMIC_MODULE}" "yes" - ${RM} $@ - ${CC} ${ALL_CFLAGS} ${SHARED_CFLAGS} -c $< -else - ${RM} unshared/$@ - ${CC} ${ALL_CFLAGS} -c $< -o unshared/$@ -endif + ${LIBTOOL} ${CC} ${ALL_CFLAGS} -c $< # Main targets # ------------ -ifeq "${USE_DYNAMIC_MODULE}" "yes" -all : lib${LIBNAME}.so.${SOGLREV} -else -all : unshared-subdir lib${LIBNAME}.a -endif +all : lib${LIBNAME}.la clean : @@ -79,20 +68,8 @@ ${DEPEND} -f .deps -- ${ALL_CFLAGS} -- ${SRCS} -ifeq "${USE_DYNAMIC_MODULE}" "yes" -install: lib${LIBNAME}.so.${SOGLREV} - @if [ -d ${DESTDIR}${INSTALL_libdir} ]; then set +x; \ - else (set -x; ${MKDIR} ${DESTDIR}${INSTALL_libdir}); fi - ${INSTALL} ${INSTALLFLAGS} ${INSTBINFLAGS} lib${LIBNAME}.so.${SOGLREV} ${DESTDIR}${INSTALL_libdir} - @T=`echo ${DESTDIR}${INSTALL_libdir}/lib${LIBNAME}.so.${SOGLREV} | sed 's/\.[^\.]*$$//'`; set -x; ${RM} $$T && ${LN} lib${LIBNAME}.so.${SOGLREV} $$T - ${RM} ${DESTDIR}${INSTALL_libdir}/lib${LIBNAME}.so - ${LN} lib${LIBNAME}.so.${SOGLREV} ${DESTDIR}${INSTALL_libdir}/lib${LIBNAME}.so -else -install: lib${LIBNAME}.a - @if [ -d ${DESTDIR}${INSTALL_libdir} ]; then set +x; \ - else (set -x; ${MKDIR} ${DESTDIR}${INSTALL_libdir}); fi - ${INSTALL} ${INSTALLFLAGS} ${INSTBINFLAGS} lib${LIBNAME}.a ${DESTDIR}${INSTALL_libdir} -endif +install: lib${LIBNAME}.la + ${LIBTOOL} ${BSD_INSTALL_DATA} $< ${DESTDIR}${INSTALL_libdir} tags : ${TAGS} -w *.[ch] @@ -110,21 +87,9 @@ render.c: genlib.tcl genGL.tcl ${TCLSH} genlib.tcl -lib${LIBNAME}.so.${SOGLREV} : render.c ${OBJS} - ${RM} $@~ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ - if [ `uname` = "SunOS" ] ; then \ - ${CC} -o ./$@~ ${SHARED_LDFLAGS} -Wl,-h,$$SONAME ${OBJS} \ - ${XLIBDIR} ${XLIBS} ${LIBS} ${MATHLIBS}; \ - else \ - ${CC} -o ./$@~ ${SHARED_LDFLAGS} -Wl,-soname,$$SONAME ${OBJS} \ - ${XLIBDIR} ${XLIBS} ${LIBS} ${MATHLIBS}; \ - fi; \ - ${RM} $$SONAME; ${LN} $@ $$SONAME; \ - ${RM} $@ - ${MV} $@~ $@ - ${RM} lib${LIBNAME}.so - ${LN} $@ lib${LIBNAME}.so +lib${LIBNAME}.la : render.c ${OBJS} + ${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${INSTALL_libdir} \ + -version-info ${SOGLREV} -o $@ ${OBJS:.o=.lo} lib${LIBNAME}.a : render.c ${UNSHARED_OBJS} ${RM} $@~