$NetBSD: patch-ab,v 1.1.1.1 2004/01/26 13:34:45 jmmv Exp $

--- Lib/Makefile.orig	Sun Jun  4 02:49:23 2000
+++ Lib/Makefile
@@ -1,6 +1,5 @@
-CPPFLAGS=-I../Jpeg -I../Zlib
 # Comment out the following line if you use egcs :
-CXXFLAGS=-O3 -Wall -fno-rtti -fno-exceptions
+CXXFLAGS+=-Wall -fno-rtti -fno-exceptions
 
 INCLUDES= adpcm.h        cxform.h       graphic.h      script.h       sqrt.h\
 	bitmap.h       displaylist.h  matrix.h       shape.h        swf.h\
@@ -34,7 +33,20 @@
 #	bitstream.o
 #	dump.o
 
-all: libflash.a
+.cc.o:
+	${LIBTOOL} --mode=compile ${CXX} -c ${CPPFLAGS} ${CXXFLAGS} $<
+
+all: libflash.la
+
+install: libflash.la
+	${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} libflash.la ${PREFIX}/lib
+	${BSD_INSTALL_DATA_DIR} ${PREFIX}/include/flash
+	for file in ${INCLUDES}; do \
+		${BSD_INSTALL_DATA} $$file ${PREFIX}/include/flash; \
+	done
+
+libflash.la: $(SWFOBJS)
+	${LIBTOOL} --mode=link ${CC} ${LDFLAGS} -o $@ ${SWFOBJS:.o=.lo} -rpath ${PREFIX}/lib -ljpeg -lz ${LIBSTDCPP} ${LIBOSSAUDIO} -version-info 0:4
 
 libflash.a: $(SWFOBJS) 
 	ar rcs $@ $(SWFOBJS)