$OpenBSD: patch-makefile,v 1.1.1.1 2005/01/21 06:49:11 jolan Exp $
--- makefile.orig	Tue Jan  4 17:18:48 2005
+++ makefile	Thu Jan 20 21:21:01 2005
@@ -1,35 +1,35 @@
 # configure daapd here
 
-HOWL_ENABLE = 0
+HOWL_ENABLE = 1
 ZLIB_ENABLE = 1
-MPEG4_ENABLE = 0
+MPEG4_ENABLE = 1
 
 
 # no need to touch anything below this line
 # -----------------------------------------
 
-CC = g++
+#CC = g++
 MAKE = $(MAKE_COMMAND)
 TARGET = daapd
 DEPS = daaplib_ libhttpd_
 OBJS = daapd.o db.o dboutput.o songcache.o parsemp3.o util.o
 LIBS = -ldaaplib -lhttpd-persistent -lid3tag -lz
-LIBPATH = -L. -L./daaplib/src -L./libhttpd/src  -L/usr/local/lib
-INCPATH = -I. -I./daaplib/include -I./libhttpd/src  -I/usr/local/include
+LIBPATH = -L. -L./daaplib/src -L./libhttpd/src  -L$(LOCALBASE)/lib
+INCPATH = -I. -I./daaplib/include -I./libhttpd/src  -I$(LOCALBASE)/include
 DEPLOY = /usr/local
-CFLAGS = -Wall -Wno-multichar
+CFLAGS+= -Wall -Wno-multichar
 
 # HOWL
 ifeq ($(HOWL_ENABLE),1)
-	HOWLDIRS := $(sort $(wildcard /usr/local/include/howl*) )
+	HOWLDIRS := $(sort $(wildcard $(LOCALBASE)/include/howl*) )
 ifeq ($(words $(HOWLDIRS) ), 0)
-$(error howl not found in /usr/local/include. Install howl or disable it in the makefile)
+$(error howl not found in $(LOCALBASE)/include. Install howl or disable it in the makefile)
 endif
 	HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )
 	INCPATH := $(INCPATH) -I$(HOWLRECENT)
 	LIBS := $(LIBS) -lhowl
 	CFLAGS := $(CFLAGS) -DHOWL_ENABLE
-	ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __APPLE__),)
+	ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __APPLE__),)
 		LIBS := $(LIBS) -framework CoreFoundation
 	endif
 endif
@@ -42,28 +42,28 @@ ifeq ($(MPEG4_ENABLE),1)
 endif
 
 # platform specific stuff
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __sun__),)
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __sun__),)
 	LIBS := $(LIBS) -lsocket -lnsl
 endif
 
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __FreeBSD__),)
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | egrep '__FreeBSD__|__OpenBSD__'),)
 	LIBS := $(LIBS) -pthread
 else
 	LIBS := $(LIBS) -lpthread
 endif
 
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __sgi__),)
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __sgi__),)
 	LIBS := $(LIBS) /usr/lib/snprintf.o
 endif
 
 
 .cc.o:
-	$(CC) $(CFLAGS) $(INCPATH) -c $<
+	$(CXX) $(CFLAGS) $(INCPATH) -c $<
 
 all: $(DEPS) $(TARGET)
 
 $(TARGET): $(OBJS)
-	$(CC) $(CFLAGS) $(LIBPATH) -o $(TARGET) $(OBJS) $(LIBS)
+	$(CXX) $(CFLAGS) $(LIBPATH) -o $(TARGET) $(OBJS) $(LIBS)
 
 $(OBJS): types.h dboutput.h songcache.h parsemp3.h
 
@@ -80,8 +80,6 @@ clean:
 	rm $(OBJS) $(TARGET)
 
 install: $(DEPS) $(TARGET)
-	cd libhttpd && $(MAKE) install
-	cd daaplib/src && $(MAKE) install
 	cp $(TARGET) $(DEPLOY)/bin
 	chmod a+rx $(DEPLOY)/bin/$(TARGET)
 	cp $(TARGET).8 $(DEPLOY)/man/man8
