--- Makefile.orig 2000-01-01 00:00:00.000000000 -0600 +++ Makefile 2024-09-22 12:30:45.000000000 -0500 @@ -11,22 +11,34 @@ # -COMPILER = -cc -OPTIONS = -std=c99 -pedantic -Wall -o -OPTIONS_LIBS = -std=c99 -pedantic -Wall -c +PREFIX ?= /usr/local +COMPILER = $(CC) +OPTIONS = $(CFLAGS) -std=c99 -pedantic -Wall -o +OPTIONS_LIBS = $(CFLAGS) -std=c99 -pedantic -Wall -c +VERSION = 0.0.2 +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 +test: HashTest + ./HashTest + clean: rm -f core *.o *.bak *stackdump *# +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 +#