# Copyright (C) 2011, 2013-2015 Luke Shumaker prefix ?= /usr/local bindir ?= $(prefix)/bin CFLAGS += -Wall -Werror -Wextra -pedantic -std=c99 INSTALL = install RM = rm -f GOBUILD = go build BINFILES = \ batterymon \ chardiff \ chardiff_pre \ chardiff_post \ daemon \ hangman-helper \ maildups \ offlineimap-killer \ offlineimap-runner \ ord \ roll \ tempmon \ urldecode \ urlencode \ v-www-browser \ v-editor all: build .gitignore build: $(BINFILES) install: $(addprefix $(DESTDIR)$(bindir)/,$(BINFILES)) $(DESTDIR)$(bindir)/%: % | $(DESTDIR)$(bindir) $(INSTALL) '$<' '$(@D)' $(DESTDIR)$(bindir): mkdir -p '$@' clean: $(RM) $(BINFILES) $(RM) *~ %: %.go $(GOBUILD) -o $@ $< .gitignore: Makefile printf '%s\n' '*~' $(BINFILES) > $@