$NetBSD: patch-ag,v 1.8 2006/01/19 12:53:17 adam Exp $

--- src/glut/glx/Makefile.orig	2005-07-26 07:55:56.000000000 +0200
+++ src/glut/glx/Makefile
@@ -79,6 +79,7 @@ OBJECTS = $(SOURCES:.c=.o)
 ##### RULES #####
 
 .c.o:
+	${LIBTOOL} --mode=compile \
 	$(CC) -c -I$(TOP)/include $(CFLAGS) $(GLUT_CFLAGS) $<
 
 
@@ -90,10 +91,10 @@ default: $(LIB_DIR)/$(GLUT_LIB_NAME)
 
 # Make the library
 $(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
-	$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
-		-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
-		$(MKLIB_OPTIONS) -install $(LIB_DIR) \
-		$(GLUT_LIB_DEPS) $(OBJECTS)
+	${LIBTOOL} --mode=link ${CC} -o ${GLUT_LIB_NAME:.so=.la} \
+		${OBJECTS:.o=.lo} -rpath ${PREFIX}/lib \
+		-version-info ${GLUT_MAJOR}:${GLUT_MINOR} \
+		-L${X11BASE}/lib -Wl,-R${X11BASE}/lib ${GLUT_LIB_DEPS}
 
 
 clean:
