$NetBSD$

Fixes CFLAGS, LDFLAGS, and install stage.

--- Makefile.orig	2003-09-05 22:32:07.000000000 +0000
+++ Makefile
@@ -1,14 +1,14 @@
-CC = gcc
-CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -ffast-math -mcpu=athlon -march=athlon `gtk-config --cflags` -DUSE_GTK -Wall
-LD = gcc
-LDFLAGS = -shared -Wl,-Bsymbolic `gtk-config --libs` -lpthread
+#CC = gcc
+CFLAGS += -funroll-loops -ffast-math `gtk-config --cflags` -DUSE_GTK -Wall
+#LD = gcc
+LDFLAGS += -shared -Wl,-Bsymbolic `gtk-config --libs`
 
 OBJECTS	=	main.o
 
-all: mupen64_audio.so instructions
+all: mupen64_audio.so
 
 mupen64_audio.so: $(OBJECTS)
-	$(LD) $(LDFLAGS) -o $@ $(OBJECTS)
+	$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
 	strip --strip-all $@
 
 instructions:
@@ -18,6 +18,10 @@ instructions:
 .o: .c
 	$(CC) $(CFLAGS) -c -o $@ $<
 
+install:
+	$(BSD_INSTALL_DATA) mupen64_audio.so \
+		${DESTDIR}$(PREFIX)/share/mupen64-base/plugins
+
 clean:
 	rm -rf mupen64_audio.so $(OBJECTS)
 
