PREFIX ?= /usr BINDIR := $(PREFIX)/bin INSTALL := install DBDIR := /var/lib/depscollector DBFILE := $(DBDIR)/depscollector.db TARGETS := depscollector depslister .PHONY: all install install-db uninstall clean all: @echo "Nothing to build." install: $(TARGETS) @echo "Installing to $(BINDIR)" @for bin in $(TARGETS); do \ $(INSTALL) -m 0755 $$bin "$(BINDIR)/$$bin"; \ done uninstall: @echo "Uninstalling from $(BINDIR)" @for bin in $(TARGETS); do \ rm -f "$(BINDIR)/$$bin"; \ done @echo "Removing database file if present" @rm -f "$(DBFILE)" @rmdir --ignore-fail-on-non-empty "$(DBDIR)" 2>/dev/null || true clean: @echo "Nothing to clean."