# See LICENSE file for copyright and license details. BIN = electrumc MAN1 = $(BIN).1 PREFIX = /usr/local BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man CFLAGS = -Wall -Werror -Wextra LDLIBS = -lssl all: $(BIN) test: all ./test.sh $(BIN): $(BIN).c install: all @mkdir -vp $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 @cp -vf $(BIN) $(DESTDIR)$(BINDIR) @cp -vf $(MAN1) $(DESTDIR)$(MANDIR)/man1 link: all @mkdir -vp $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 @ln -rsvf $(BIN) $(DESTDIR)$(BINDIR) @ln -rsvf $(MAN1) $(DESTDIR)$(MANDIR)/man1 uninstall: @rm -vf \ $(BIN:%=$(DESTDIR)$(BINDIR)/%) \ $(MAN1:%=$(DESTDIR)$(MANDIR)/man1/%) clean: @rm -vf $(BIN) .PHONY: all install link uninstall clean