Index: trunk/psLib/src/collections/Makefile
===================================================================
--- trunk/psLib/src/collections/Makefile	(revision 1264)
+++ trunk/psLib/src/collections/Makefile	(revision 1338)
@@ -3,6 +3,6 @@
 ##  Makefile:   collections
 ##
-##  $Revision: 1.26 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-07-22 20:42:54 $
+##  $Revision: 1.27 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-07-29 21:43:11 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -37,4 +37,6 @@
            psArray.o
 
+OBJS = $(addprefix makedir/,$(SRC_OBJS))
+
 # Define PHONY target "all" which will make all the necessary items
 
@@ -43,8 +45,8 @@
 # Rule to make static library
 
-libpslib.a: $(SRC_OBJS)
+libpslib.a: $(OBJS)
 # The ar option -r is to add/replace object and -s is to create
 # a symbol table in the archive
-	$(AR) rcs ../$@ $(SRC_OBJS)
+	$(AR) rcs ../$@ $(OBJS)
 
 # Define PHONY target "install" which will install necessary files
@@ -62,5 +64,8 @@
 clean:
 	@echo "    Deleting intermediate files for 'collections'"
-	$(RM) $(SRC_OBJS) *.lint $(SRC_OBJS:.o=.i)
+	$(RM) $(OBJS) *.lint $(SRC_OBJS:.o=.i)
+
+cleandep:
+	$(RM) $(OBJS:.o=.d)
 
 %.lint: %.c
@@ -70,11 +75,11 @@
 	$(CC) -E $(CFLAGS) -o $@ $<
 
-%.o: %.i
+makedir/%.o: %.c
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-%.d: %.c
+makedir/%.d: %.c
 	$(CC) -MM $(CFLAGS) $< > $@.tmp
-	sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' $@.tmp > $@
+	sed 's|\($*\)\.o[ :]*|\1.o $@ : |g' $@.tmp > $@
 	$(RM) -f $@.tmp
 
-include $(SRC_OBJS:.o=.d)
+include $(OBJS:.o=.d)
