From aa035f73ce081b3f07247bd15860d72355a096b2 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 20 May 2022 10:42:38 -0400 Subject: Initial import --- Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..364764d --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +OBJS = tc.o +OBJS += append.o create.o info.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 + +PREFIX ?= ~/.local +BINDIR ?= $(PREFIX)/bin +MANDIR ?= $(PREFIX)/share/man + +ifeq ($(shell uname -s),Darwin) + COMMONCRYPTO ?= 1 +endif + +ifeq ($(COMMONCRYPTO),1) + CFLAGS += -DCOMMONCRYPTO +else + LIBS += -lcrypto +endif + +all: tc + +install: tc tc.1 + install -d $(BINDIR) + install -m 755 tc $(BINDIR)/ + install -d $(MANDIR)/man1/ + install -m 644 tc.1 $(MANDIR)/man1/ + +uninstall: + rm -i $(BINDIR)/tc $(MANDIR)/man1/tc.1 + +tc: $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) + +README.txt: tc.1 + mandoc $^ | col -bx > $@ + +clean: + rm -f tc $(OBJS) + +.PHONY: all clean install uninstall -- cgit v1.2.3-56-ge451