$OpenBSD$
--- Makefile.openbsd.orig	Sun Sep  3 17:54:10 2006
+++ Makefile.openbsd	Sun Sep  3 18:12:02 2006
@@ -0,0 +1,36 @@
+# wrapper around Makefile for testing and debugging
+
+all:	my-all-recursive
+
+# build test prog without shared -lgc, stub out uthread_gc.o
+my-all-recursive:	all-recursive test.o cacaoshim.o uthread_gc.o
+	gmake "CFLAGS=-g -O0" test.o
+#	gcc -pthread -g test.o cacaoshim.o uthread_gc.o /usr/lib/libpthread.a .libs/libgc.a -o xtest
+	gcc -pthread -g test.o .libs/libgc.a -o xtest
+
+# stubs for cacao refs
+cacaoshim.o:	cacaoshim.c
+	gcc -g -O0 -c cacaoshim.c
+
+# include dirs for compiling uthread_gc.c out of context
+UTHREAD_INCLUDE = -I/usr/src/lib/libpthread/uthread \
+	-I/usr/src/lib/libc/include -I/usr/src/lib/libpthread/arch/i386 -I/usr/include
+
+# stub
+uthread_gc.o:	uthread_gc.c
+	gcc -g -O0 $(UTHREAD_INCLUDE) -c uthread_gc.c
+
+my-clean:	clean
+	rm -rf xtest test.o uthread_gc.o cacaoshim.o
+
+include Makefile
+
+# overrides for debugging
+CFLAGS = -g -O0 -pipe
+MY_CFLAGS = -g -O0 -pipe
+
+# mods to the compile env
+
+DEFS += -UDEBUG_THREADS
+DEFS += -UGC_ASSERTIONS
+DEFS += -UDBG_HDRS_ALL
