Makefile 722 Bytes
SUBCOMMANDS = random \
	      rand_printable \
	      amngrdbinit \
	      amngrdbdestroy \
	      amngradd \
	      amngrcreate \
	      amngrcrypt \
	      amngrdelete \
	      amngrgen \
	      amngrgetoldpass \
	      amngrgetolduser \
	      amngrgetpass \
	      amngrgetuser \
	      amngrid \
	      amngrlist \
	      amngrrename \
	      amngrsearch

PREFIX ?= /usr/local

PROGRAM := accountmanager.sh

all:

.PHONY: clean install

install_$(PROGRAM):
	@install "$(PROGRAM)" "$(DESTDIR)/$(PREFIX)/bin/$(PROGRAM)"

install_%:
	@ln -s "$(realpath ${DESTDIR}/${PREFIX}/bin/$(PROGRAM))" \
		"${DESTDIR}/$(PREFIX)/bin/$(subst install_,,$@)"

install: install_$(PROGRAM) $(patsubst %,install_%,$(SUBCOMMANDS))

clean: