Index: /trunk/archive/psdb/makefile
===================================================================
--- /trunk/archive/psdb/makefile	(revision 3182)
+++ /trunk/archive/psdb/makefile	(revision 3183)
@@ -1,5 +1,5 @@
 SHELL=/bin/sh
 CFG=/usr/bin/mysql_config
-CFLAGS=-g -O0 -pipe -fPIC -Wall -pedantic -std=c99 -L/usr/local/lib -I/usr/local/include
+CFLAGS=-g -O0 -pipe -fpic -Wall -pedantic -std=c99 -L/usr/local/lib -I/usr/local/include
 MYLIBS:=$(shell $(CFG) --libs)
 MYFLAGS:=$(shell $(CFG) --cflags)
@@ -8,8 +8,14 @@
 objects=test.o psleak.o psDB.o
 
-all: test
+all: psdb
 
-test: $(objects)
-	$(CC) $(CFLAGS) -o test $(objects) $(LIBS) $(MYFLAGS) $(MYLIBS)
+test: psdb test-bin
+	LD_LIBRARY_PATH=. ./test
+     
+test-bin: test.o
+	$(CC) $(CFLAGS) -o test -L./ -lpsdb
+
+psdb: $(objects)
+	$(CC) $(CFLAGS) -shared -o libpsdb.so $(objects) $(LIBS) $(MYFLAGS) $(MYLIBS)
 
 $(objects): %.o : %.c
