Index: /trunk/psLib/src/collections/Makefile
===================================================================
--- /trunk/psLib/src/collections/Makefile	(revision 576)
+++ /trunk/psLib/src/collections/Makefile	(revision 577)
@@ -1,36 +1,73 @@
+###############################################################################
+##
+##  Makefile:   sysUtils
+##
+##  $Revision: 1.5 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-05-05 20:42:11 $
+##
+##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+###############################################################################
+
+# Define variable prefix to the top level project - psLib
+# This is necessary for definition is Makefile.Globals uses prefix
+
 ifndef prefix
     export prefix=$(shell cd ../..;pwd)
 endif
 
-TARGET = libpsCollections.a
+# Define the two targets to be built
 
-all: $(TARGET)
+TARGET_STATIC  = libpsCollections.a
+TARGET_DYNAMIC = libpsCollections.$(DLL)
+
+# Include the make global definitions for the project
 
 include ../Makefile.Globals
 
-SRC_OBJS = \
-    psArray.o \
-    psBitMask.o \
-    psSort.o \
-    psArray.o
+# Set CFLAGS used by the implicit rule to compile .c
 
-INCLUDES = -I$(includedir)
+CFLAGS := $(CFLAGS_RELOC) -I../sysUtils
 
-%.o: %.c
-	@echo "    Compiling $<. "
-	$(CC) $(CFLAGS) -DPS_ALLOW_MALLOC $(INCLUDE_GLOBAL) $(INCLUDES) -c $< -o $@
+# Define the source objects
+ 
+SRC_OBJS = psBitSet.o    \
+           psArray.o     \
+           psSort.o
+
+# Define PHONY target "all" which will make all the necessary items
+
+all: $(TARGET_STATIC) $(TARGET_DYNAMIC)
+
+# Rule to make static library
 
 libpsCollections.a: $(SRC_OBJS)
-	$(AR) -r libpsCollections.a $(SRC_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)
 
-install: $(TARGET)
+# Rule to make dynamic library
+
+libpsCollections.$(DLL): $(SRC_OBJS)
+	$(CC) $(LDFLAGS_DLL) $(SRC_OBJS) -o ../$@  
+
+# Define PHONY target "install" which will install necessary files
+
+install: $(TARGET_STATIC) $(TARGET_DYNAMIC)
 	install *.h $(includedir)
-	install $(TARGET) $(libexecdir)
+	install ../$(TARGET_STATIC) $(libexecdir)
+	install ../$(TARGET_DYNAMIC) $(libexecdir)
+
+# Define PHONY target "distclean" which will cleanup the distribution
 
 distclean:	clean
-	$(RM) $(TARGET)
+	$(RM) ../$(TARGET_STATIC)
+	$(RM) ../$(TARGET_DYNAMIC)
+	$(RM) $(libexecdir)/$(TARGET_STATIC)
+	$(RM) $(libexecdir)/$(TARGET_DYNAMIC)
+
+# Define PHONY target "clean" which will cleanup the development area
 
 clean:
-	@echo "    Deleting intermediate files for 'utilities - $(CFG)'"
+	@echo "    Deleting intermediate files for 'collections'"
 	$(RM) $(SRC_OBJS) *.lint
 
