$OpenBSD: patch-Makefile,v 1.2 2009/12/24 21:43:32 jakemsr Exp $
--- Makefile.orig	Sun Sep 17 15:18:20 1995
+++ Makefile	Fri Oct 26 22:12:40 2007
@@ -25,10 +25,10 @@ DACIO_ARCH = dacio-linux.c
 
 #}
 
-CFLAGS	= $(CFLAGS_OS) $(CFLAGS_OPT) $(CFLAGS_EXT)
-CFLAGS_HIOPT_ = $(CFLAGS_OS) $(CFLAGS_HIOPT) $(CFLAGS_EXT)
+#CFLAGS	= $(CFLAGS_OS) $(CFLAGS_OPT) $(CFLAGS_EXT)
+CFLAGS_HIOPT_ = $(CFLAGS) $(CFLAGS_HIOPT)
 LDFLAGS	= $(LDFLAGS_OS) $(LDFLAGS_EXT)
-LIBS	= $(LIBS_EXT) $(LIBS_OS)
+LIBS	= $(LIBS_EXT) $(LIBS_OS) -lsndio
 
 PROG	= nspmod
 all:	$(PROG)
@@ -37,7 +37,7 @@ OBJS0	= nspmod.o play-s3m.o play-mod.o play-mtm.o ovs.
 	inst.o hirev.o mem.o
 OBJS	= $(OBJS0) dacio.o
 $(PROG): $(OBJS)
-	$(CC) $(LDFLAGS) -o $@ $(OBJS)
+	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
 hirev.o: hirev.c
 	$(CC) $(CFLAGS_HIOPT_) -c hirev.c
