--- Makefile	Mon Apr 26 20:24:58 2004
+++ ../../Makefile	Mon Sep 13 09:07:45 2004
@@ -11,23 +11,37 @@
 # http://www.opensource.org/licenses/cpl.php
 #
 
+PREFIX        = /opt/local
 COMPILER      = gcc
 OPTIONS       = -ansi -pedantic -Wall -o
 OPTIONS_LIBS  = -ansi -pedantic -Wall -c
+VERSION       = 0.0.2
 
-all: GeneralHashFunctions.o HashTest
+all: GeneralHashFunctions.o HashTest dylib
+
+dylib: GeneralHashFunctions.o
+	$(COMPILER) -dynamiclib -install_name $(PREFIX)/lib/libghash.$(VERSION).dylib -current_version $(VERSION) -o libghash.$(VERSION).dylib GeneralHashFunctions.o
 
 GeneralHashFunctions.o: GeneralHashFunctions.c GeneralHashFunctions.h
 	$(COMPILER) $(OPTIONS_LIBS) GeneralHashFunctions.c
 
-HashTest: GeneralHashFunctions.c HashTest.c
+HashTest: GeneralHashFunctions.o HashTest.c
 	$(COMPILER) $(OPTIONS) HashTest HashTest.c GeneralHashFunctions.o
 
+check: HashTest
+	./HashTest
+
 clean:
 	rm -f core
 	rm -f *.o
 	rm -f *.bak
 
+install:
+	install -m 644 GeneralHashFunctions.h $(DESTDIR)$(PREFIX)/include/libghash.h
+	install -m 644 libghash.$(VERSION).dylib $(DESTDIR)$(PREFIX)/lib
+	cd $(DESTDIR)$(PREFIX)/lib && ln -s libghash.$(VERSION).dylib libghash.dylib
+
+
 #
 # The End !
-#
\ No newline at end of file
+#
