Index: trunk/archive/psdb/makefile
===================================================================
--- trunk/archive/psdb/makefile	(revision 3184)
+++ trunk/archive/psdb/makefile	(revision 3252)
@@ -6,15 +6,19 @@
 LIBS=-lpslib
 
-objects=test.o psleak.o psDB.o
+test_objects=test.o psleak.o
+objects=psDB.o
 
-all: psdb
+all: libpsdb.so
 
-test: psdb test-bin
+test: test-bin
 	LD_LIBRARY_PATH=. ./test
      
-test-bin: test.o
-	$(CC) $(CFLAGS) -o test -L./ -lpsdb
+test-bin: $(test_objects) libpsdb.so
+	$(CC) $(CFLAGS) -o test $(test_objects) -L./ -lpsdb
 
-psdb: $(objects)
+$(test-objects): %.o : %.c
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+libpsdb.so: $(objects)
 	$(CC) $(CFLAGS) -shared -o libpsdb.so $(objects) $(LIBS) $(MYSQL_FLAGS) $(MYSQL_LIBS)
 
@@ -23,3 +27,3 @@
 
 clean:
-	$(RM) *.so *.o core
+	$(RM) *.so *.o core test
