--- Makefile.orig 2000-01-01 00:00:00.000000000 +1100
+++ Makefile 2013-09-27 22:31:44.000000000 +1000
# http://www.opensource.org/licenses/cpl1.0.php
-OPTIONS = -std=c99 -pedantic -Wall -o
-OPTIONS_LIBS = -std=c99 -pedantic -Wall -c
+OPTIONS = $(CFLAGS) -std=c99 -pedantic -Wall -o
+OPTIONS_LIBS = $(CFLAGS) -std=c99 -pedantic -Wall -c
+all: GeneralHashFunctions.o HashTest dylib
-all: GeneralHashFunctions.o HashTest
+dylib: GeneralHashFunctions.o
+ $(COMPILER) $(LDFLAGS) -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
rm -f core *.o *.bak *stackdump *#
+ 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
\ No newline at end of file