--- portmidi-20041117.orig/pm_test/debian/Makefile
+++ portmidi-20041117/pm_test/debian/Makefile
@@ -0,0 +1,36 @@
+# For debugging, define PM_CHECK_ERRORS
+PMFLAGS = -DPM_CHECK_ERRORS
+# Use this for linux alsa (0.9x) version
+ALSALIB = -lasound
+pmlib = -lportmidi
+ptlib = -lporttime
+VFLAGS = -DPMALSA
+
+CC = gcc $(CFLAGS) $(VFLAGS) $(PMFLAGS) -g
+
+all: simple_test sysex midithread latency midithru mm
+
+simple_test: simple_test.o
+	$(CC) simple_test.c -o simple_test $(pmlib) $(ptlib) $(ALSALIB)
+
+sysex: sysex.o
+	$(CC) sysex.c -o sysex $(pmlib) $(ptlib) $(ALSALIB)
+
+midithread: midithread.o
+	$(CC) midithread.c -o midithread \
+		$(pmlib) $(ptlib) $(ALSALIB)
+
+latency: latency.o
+	$(CC) latency.c -o latency $(pmlib) $(ptlib) \
+		$(ALSALIB) -lpthread -lm
+
+midithru: midithru.o
+	$(CC) midithru.c -o midithru $(pmlib) $(ptlib) \
+		$(ALSALIB) -lpthread -lm
+
+mm: mm.o
+	$(CC) mm.c -o mm $(pmlib) $(ptlib) \
+		$(ALSALIB) -lpthread -lm
+
+clean:
+	rm -f *.o mm midithru latency midithread sysex simple_test
