]> git.cameronkatri.com Git - trustcache.git/blobdiff - Makefile
Add support for new version 2 trustcaches
[trustcache.git] / Makefile
index fb2bd372f3053a1648873d8311074db475cf0733..7b7aec982af6fbf0496a8f4e2262799aa7d3c496 100644 (file)
--- 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