$NetBSD: patch-ad,v 1.8 2006/01/19 12:53:17 adam Exp $ --- src/mesa/Makefile.orig 2005-07-26 07:55:56.000000000 +0200 +++ src/mesa/Makefile @@ -14,13 +14,13 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$ .SUFFIXES : .cpp .c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + ${LIBTOOL} --mode=compile $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ .cpp.o: - $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@ + ${LIBTOOL} --mode=compile $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@ .S.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + ${LIBTOOL} --mode=compile $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ # Figure out what to make here @@ -150,25 +150,23 @@ subdirs: # Make the GL library $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) - @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \ - -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ - -install $(LIB_DIR) \ - $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) + ${LIBTOOL} --mode=link ${CC} -o ${GL_LIB_NAME:.so=.la} \ + ${STAND_ALONE_OBJECTS:.o=.lo} \ + -rpath ${PREFIX}/lib -version-info ${GL_MAJOR}:${GL_MINOR} \ + -L${X11BASE}/lib -Wl,-R${X11BASE}/lib ${GL_LIB_DEPS} # Make the OSMesa library $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) @ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ - $(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \ - -major $(MESA_MAJOR) \ - -minor $(MESA_MINOR) -patch $(MESA_TINY) \ - -install $(LIB_DIR) $(MKLIB_OPTIONS) \ - $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \ + ${LIBTOOL} --mode=link ${CC} -o ${OSMESA_LIB_NAME:.so=.la} \ + ${OSMESA16_OBJECTS:.o=.lo} -rpath ${PREFIX}/lib \ + -version-info ${MESA_MAJOR}:${MESA_MINOR} \ + ${OSMESA_LIB_DEPS:S|-lGL|libGL.la|} ; \ else \ - $(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \ - -major $(MESA_MAJOR) \ - -minor $(MESA_MINOR) -patch $(GL_TINY) \ - -install $(LIB_DIR) $(MKLIB_OPTIONS) \ - $(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \ + ${LIBTOOL} --mode=link ${CC} -o ${OSMESA_LIB_NAME:.so=.la} \ + ${OSMESA_DRIVER_OBJECTS:.o=.lo} -rpath ${PREFIX}/lib \ + -version-info ${MESA_MAJOR}:${MESA_MINOR} \ + ${OSMESA_LIB_DEPS:S|-lGL|libGL.la|} ; \ fi