diff -urN alogg-1.3.7/Makefile alogg-1.3.7-haiku/Makefile
--- alogg-1.3.7/Makefile	2009-03-11 20:54:16.000000000 +0000
+++ alogg-1.3.7-haiku/Makefile	2009-03-11 21:14:58.000000000 +0000
@@ -1,7 +1,7 @@
 
 # Select your system if not autodetected by uncommenting the appropriate line:
 
-#SYSTEM=unix
+SYSTEM=unix
 #SYSTEM=dos
 #SYSTEM=windows
 
@@ -42,7 +42,7 @@
 
 
 ifeq ($(SYSTEM),unix)
-  ALLEGRO_CONFIG_OPTS=--libs
+  ALLEGRO_CONFIG_OPTS=
   ifeq ($(SHARED),)
     ALLEGRO_CONFIG_OPTS+=--static
   else
@@ -51,7 +51,7 @@
   ifneq ($(DEBUG),)
     ALLEGRO_CONFIG_OPTS+=debug
   endif
-  ALLEGRO=`allegro-config $(ALLEGRO_CONFIG_OPTS)`
+  ALLEGRO=`$(ALLEGRO_CONFIG_OPTS)`
   RM=rm -f
   RMTREE=rm -rf
   INSTALL_DIR=install -d -m 755
@@ -62,12 +62,12 @@
   PATHSEP=/
   SUFFIX=
   ifeq ($(PREFIX),)
-    PREFIX=/usr/local
+    PREFIX=/boot/common
   endif
 else
 ifeq ($(SYSTEM),dos)
   ifeq ($(DEBUG),)
-    ALLEGRO=-lalleg
+    ALLEGRO=
   else
     ALLEGRO=-lalld
   endif
@@ -103,9 +103,9 @@
   ALLEGRO=
   ifeq ($(DEBUG),)
     ifeq ($(SHARED),)
-      ALLEGRO+=-lalleg_s
+      ALLEGRO+=
     else
-      ALLEGRO+=-lalleg
+      ALLEGRO+=
     endif
   else
     ifeq ($(SHARED),)
@@ -169,7 +169,7 @@
 BASELIBNAME:=$(BASELIBNAME)t
 BASEBINNAME:=$(BASEBINNAME)t
 else
-LIBS=-lvorbisfile -lvorbisenc -lvorbis -logg -lm
+LIBS=-lvorbisfile -lvorbisenc -lvorbis -logg `allegro-config --libs`
 endif
 
 ifneq ($(CURL),)
@@ -229,7 +229,7 @@
 EXAMPLES+=$(BASEBINNAME)_thread$(SUFFIX)
 endif
 
-all: $(LIBNAME) $(EXAMPLES) alogg.html
+all: $(LIBNAME) $(EXAMPLES)
 
 ifeq ($(SYSTEM),unix)
 all: alogg-config
@@ -323,8 +323,6 @@
 	-$(RM) alogg.rtf
 	-$(RM) alogg.txt
 	-$(RM) alogg.ascii
-	-$(RM) datogg_*.3
-	-$(RM) alogg_*.3
 	-$(RM) alogg-config
 
 install: install_alogg_config \
@@ -373,8 +371,6 @@
 	-$(INSTALL_DIR) $(PREFIXD)man/$(PATHSEP)man1
 	$(INSTALL_MAN) alogg-config.1 $(PREFIXD)man$(PATHSEP)man1
 	-$(INSTALL_DIR) $(PREFIXD)man/$(PATHSEP)man3
-	-$(INSTALL_MAN) datogg_*.3 $(PREFIXD)man$(PATHSEP)man3
-	-$(INSTALL_MAN) alogg_*.3 $(PREFIXD)man$(PATHSEP)man3
 
 uninstall:
 	-$(RM) $(PREFIXD)bin$(PATHSEP)$(BASEBINNAME)_play
@@ -392,8 +388,6 @@
           echo "there might be some links to $(SHAREDLIBNAME) left")
 	-$(RMTREE) $(PREFIXD)include$(PATHSEP)alogg
 	-$(RM) $(PREFIXD)man$(PATHSEP)man1$(PATHSEP)alogg-config.1
-	-$(RM) $(PREFIXD)man$(PATHSEP)man3$(PATHSEP)datogg_*.3
-	-$(RM) $(PREFIXD)man$(PATHSEP)man3$(PATHSEP)alogg_*.3
 
 dist:
 	-rm -f $(TARBALLNAME).tar.gz
@@ -415,18 +409,6 @@
 	zip -rl $(ZIPNAME).zip $(ZIPNAME)
 	rm -rf $(ZIPNAME)
 
-alogg.html: alogg._tx
-	makedoc -html alogg.html alogg._tx
-	@echo The docs can be generated in a variety of formats.
-	@echo To generate the docs in the FOO format, type:
-	@echo \ \ make TYPE=FOO docs
-	@echo For example, to generate docs in text format, type:
-	@echo \ \ make TYPE=txt docs
-	@echo Note: Allegro\'s makedoc must be in your path.
-
-docs:
-	makedoc -$(TYPE) alogg.$(TYPEEXT) alogg._tx
-
 autodetect_message:
 	@echo Your system type could not be autodetected
 	@echo Edit the Makefile and select your system before trying again
