$NetBSD: patch-aa,v 1.2 2006/04/14 09:56:03 adam Exp $ --- lib/Makefile.orig 2006-02-05 01:34:34.000000000 +0100 +++ lib/Makefile @@ -183,6 +183,12 @@ OBJS_NETBSD=\ portaudio/pa_unix_oss/pa_unix.o +OBJS_NETBSD=\ + unixfuncs.o \ + portmixer/px_unix_oss/px_unix_oss.o \ + portaudio/pa_unix_oss/pa_unix_oss.o \ + portaudio/pa_unix_oss/pa_unix.o + OBJS_SOLARIS=\ unixfuncs.o \ portmixer/px_solaris/px_solaris.o \ @@ -229,6 +235,9 @@ else ifneq (,$(findstring NetBSD,$(shell uname))) OSTYPE=NETBSD else +ifneq (,$(findstring NetBSD,$(shell uname))) +OSTYPE=NETBSD +else $(warning OSTYPE cannot be detected, assuming Linux) OSTYPE=LINUX endif @@ -237,6 +246,7 @@ endif endif endif endif +endif # Setup platform-specific stuff based on gleaning ifeq ($(OSTYPE),WIN32) @@ -254,6 +264,13 @@ DYNCFLAGS=-fPIC DYNLIB=libiaxclient.so endif +ifeq ($(OSTYPE),NETBSD) +OBJS:= $(OBJS) $(OBJS_NETBSD) +DYNCFLAGS=-fPIC +DYNLIB=libiaxclient.so +DYNLDFLAGS= -lossaudio +endif + ifeq ($(OSTYPE),SOLARIS) OBJS:= $(OBJS) $(OBJS_SOLARIS) # only SPARC solaris machines need the alignment stuff