X-Git-Url: https://git.cameronkatri.com/trustcache.git/blobdiff_plain/2288b178e612386e7a75471c8861c3f6d81c300d..HEAD:/Makefile diff --git a/Makefile b/Makefile index fb2bd37..7b7aec9 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ -OBJS = tc.o +OBJS = trustcache.o OBJS += append.o create.o info.o remove.o OBJS += machoparse/cdhash.o cache_from_tree.o sort.o OBJS += uuid/gen_uuid.o uuid/pack.o uuid/unpack.o uuid/parse.o uuid/unparse.o uuid/copy.o +OBJS += compat_strtonum.o -PREFIX ?= ~/.local -BINDIR ?= $(PREFIX)/bin -MANDIR ?= $(PREFIX)/share/man +DESTDIR ?= +PREFIX ?= ~/.local +BINDIR ?= $(DESTDIR)$(PREFIX)/bin +MANDIR ?= $(DESTDIR)$(PREFIX)/share/man ifeq ($(shell uname -s),Darwin) COMMONCRYPTO ?= 1 @@ -17,24 +19,24 @@ else LIBS += -lcrypto endif -all: tc +all: trustcache -install: tc tc.1 +install: trustcache trustcache.1 install -d $(BINDIR) - install -m 755 tc $(BINDIR)/ + install -m 755 trustcache $(BINDIR)/ install -d $(MANDIR)/man1/ - install -m 644 tc.1 $(MANDIR)/man1/ + install -m 644 trustcache.1 $(MANDIR)/man1/ uninstall: - rm -i $(BINDIR)/tc $(MANDIR)/man1/tc.1 + rm -i $(BINDIR)/trustcache $(MANDIR)/man1/trustcache.1 -tc: $(OBJS) +trustcache: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) -README.txt: tc.1 +README.txt: trustcache.1 mandoc $^ | col -bx > $@ clean: - rm -f tc $(OBJS) + rm -f trustcache $(OBJS) .PHONY: all clean install uninstall