diff -uNr cmt/src/analogue.cpp cmt-new/src/analogue.cpp
--- cmt/src/analogue.cpp	Sat Feb 17 06:50:07 2001
+++ cmt-new/src/analogue.cpp	Sun Oct 26 21:25:27 2003
@@ -24,7 +24,7 @@
 
 /*****************************************************************************/
 
-#include <malloc.h>
+#include <unistd.h>
 #include <math.h>
 #include <stdlib.h>
 #include "cmt.h"
diff -uNr cmt/src/canyondelay.cpp cmt-new/src/canyondelay.cpp
--- cmt/src/canyondelay.cpp	Sat Nov  4 06:39:53 2000
+++ cmt-new/src/canyondelay.cpp	Sun Oct 26 21:25:27 2003
@@ -25,7 +25,7 @@
 /*****************************************************************************/
 
 
-#include <malloc.h>
+#include <unistd.h>
 #include <math.h>
 #include "cmt.h"
 
diff -uNr cmt/src/lofi.cpp cmt-new/src/lofi.cpp
--- cmt/src/lofi.cpp	Mon Sep 17 18:15:46 2001
+++ cmt-new/src/lofi.cpp	Sun Oct 26 21:25:27 2003
@@ -24,7 +24,7 @@
 
 /*****************************************************************************/
 
-#include <malloc.h>
+#include <unistd.h>
 #include <math.h>
 #include <stdlib.h>
 #include "cmt.h"
diff -uNr cmt/src/makefile cmt-new/src/makefile
--- cmt/src/makefile	Thu Dec 19 15:52:51 2002
+++ cmt-new/src/makefile	Sun Oct 26 21:26:14 2003
@@ -5,15 +5,15 @@
 # Change this if you want to install somewhere else. In particularly
 # you may wish to remove the middle "local/" part.
 
-INSTALL_PLUGINS_DIR	=	/usr/local/lib/ladspa/
+INSTALL_PLUGINS_DIR	=	@PREFIX@/lib/ladspa/
 
 ###############################################################################
 #
 # GENERAL
 #
 
-INCLUDES	=	-I/usr/local/include/
-CFLAGS		=	$(INCLUDES) -Wall -Werror -O3 -fPIC
+INCLUDES	=	-I. -I@PREFIX@/include/
+CFLAGS		=	$(INCLUDES) -Wall -Werror -O3 -fno-common
 CXXFLAGS	=	$(CFLAGS)
 PLUGIN_LIB	=	../plugins/cmt.so
 
@@ -68,24 +68,12 @@
 targets:	$(PLUGIN_LIB)
 
 $(PLUGIN_LIB):	$(PLUGIN_OBJECTS)
-	$(CXX)	-shared							\
+	$(CXX)	-dynamiclib -L@PREFIX@/lib -ldl				\
 		-o $(PLUGIN_LIB)					\
 		$(PLUGIN_OBJECTS)					
 
 install:	$(PLUGIN_LIB)
-	-strip $(PLUGIN_LIB)
 	cp $(PLUGIN_LIB) $(INSTALL_PLUGINS_DIR)
-
-test:	/tmp/test.wav ../../ladspa_sdk/snd/noise.wav always
-	@echo ---------------------------------------------
-	@echo First listen to the white noise input signal:
-	@echo ---------------------------------------------
-	play ../../ladspa_sdk/snd/noise.wav
-	@echo -------------------------
-	@echo Compare to plugin output.
-	@echo -------------------------
-	@echo Should be a noise band around 6000Hz, repeated quietly after 1s.
-	play /tmp/test.wav
 
 /tmp/test.wav:	$(PLUGIN_LIB) ../../ladspa_sdk/snd/noise.wav
 	analyseplugin $(PLUGIN_LIB)
diff -uNr cmt/src/phasemod.cpp cmt-new/src/phasemod.cpp
--- cmt/src/phasemod.cpp	Mon Sep 17 18:15:46 2001
+++ cmt-new/src/phasemod.cpp	Sun Oct 26 21:25:27 2003
@@ -24,7 +24,7 @@
 
 /*****************************************************************************/
 
-#include <malloc.h>
+#include <unistd.h>
 #include <math.h>
 #include <stdlib.h>
 #include "cmt.h"
diff -uNr cmt/src/syndrum.cpp cmt-new/src/syndrum.cpp
--- cmt/src/syndrum.cpp	Thu Dec 19 15:54:36 2002
+++ cmt-new/src/syndrum.cpp	Sun Oct 26 21:25:27 2003
@@ -24,7 +24,7 @@
 
 /*****************************************************************************/
 
-#include <malloc.h>
+#include <unistd.h>
 #include <math.h>
 #include "cmt.h"
 
diff -uNr cmt/src/vcf303.cpp cmt-new/src/vcf303.cpp
--- cmt/src/vcf303.cpp	Sat Nov  4 06:39:53 2000
+++ cmt-new/src/vcf303.cpp	Sun Oct 26 21:25:27 2003
@@ -26,7 +26,7 @@
 /*****************************************************************************/
 
 
-#include <malloc.h>
+#include <unistd.h>
 #include <math.h>
 #include "cmt.h"
 
