]> git.cameronkatri.com Git - trustcache.git/blob - Makefile
Add tc remove and append -f flags
[trustcache.git] / Makefile
1 OBJS = tc.o
2 OBJS += append.o create.o info.o remove.o
3 OBJS += machoparse/cdhash.o cache_from_tree.o sort.o
4 OBJS += uuid/gen_uuid.o uuid/pack.o uuid/unpack.o uuid/parse.o uuid/unparse.o uuid/copy.o
5
6 PREFIX ?= ~/.local
7 BINDIR ?= $(PREFIX)/bin
8 MANDIR ?= $(PREFIX)/share/man
9
10 ifeq ($(shell uname -s),Darwin)
11 COMMONCRYPTO ?= 1
12 endif
13
14 ifeq ($(COMMONCRYPTO),1)
15 CFLAGS += -DCOMMONCRYPTO
16 else
17 LIBS += -lcrypto
18 endif
19
20 all: tc
21
22 install: tc tc.1
23 install -d $(BINDIR)
24 install -m 755 tc $(BINDIR)/
25 install -d $(MANDIR)/man1/
26 install -m 644 tc.1 $(MANDIR)/man1/
27
28 uninstall:
29 rm -i $(BINDIR)/tc $(MANDIR)/man1/tc.1
30
31 tc: $(OBJS)
32 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
33
34 README.txt: tc.1
35 mandoc $^ | col -bx > $@
36
37 clean:
38 rm -f tc $(OBJS)
39
40 .PHONY: all clean install uninstall