]> git.cameronkatri.com Git - trustcache.git/blob - Makefile
Add actions and artifacts
[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 OBJS += compat_strtonum.o
6
7 PREFIX ?= ~/.local
8 BINDIR ?= $(PREFIX)/bin
9 MANDIR ?= $(PREFIX)/share/man
10
11 ifeq ($(shell uname -s),Darwin)
12 COMMONCRYPTO ?= 1
13 endif
14
15 ifeq ($(COMMONCRYPTO),1)
16 CFLAGS += -DCOMMONCRYPTO
17 else
18 LIBS += -lcrypto
19 endif
20
21 all: tc
22
23 install: tc tc.1
24 install -d $(BINDIR)
25 install -m 755 tc $(BINDIR)/
26 install -d $(MANDIR)/man1/
27 install -m 644 tc.1 $(MANDIR)/man1/
28
29 uninstall:
30 rm -i $(BINDIR)/tc $(MANDIR)/man1/tc.1
31
32 tc: $(OBJS)
33 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
34
35 README.txt: tc.1
36 mandoc $^ | col -bx > $@
37
38 clean:
39 rm -f tc $(OBJS)
40
41 .PHONY: all clean install uninstall