$NetBSD$

--- libavutil/Makefile.orig	2006-04-24 07:06:44.000000000 +0930
+++ libavutil/Makefile	2006-04-24 07:06:51.000000000 +0930
@@ -28,12 +28,14 @@
 endif
 endif
 
+install: all
+	$(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) $(LIB:.a=.la) $(prefix)/lib
+
 all: $(LIB) $(SLIBNAME)
 
 $(LIB): $(OBJS)
 	rm -f $@
-	$(AR) rc $@ $(OBJS)
-	$(RANLIB) $@
+	$(LIBTOOL) --mode=link $(CC) -o $(LIB:.a=.la) $(OBJS:.o=.lo)  $(PPOBJS:.o=.lo) -rpath $(prefix)/lib $(EXTRALIBS)
 
 $(SLIBNAME): $(OBJS)
 ifeq ($(CONFIG_WIN32),yes)
@@ -44,12 +46,7 @@
 endif
 
 %.o: %.c
-	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< 
-
-depend: $(SRCS)
-	$(CC) -MM $(CFLAGS) $^ 1>.depend
-
-dep:	depend
+	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
 
 clean:
 	rm -f *.o *.d *~ .depend $(LIB) $(SLIBNAME) *$(SLIBSUF)
