35 lines
537 B
Makefile
35 lines
537 B
Makefile
SHELL = /bin/bash
|
|
|
|
prefix ?= /usr/local
|
|
bindir ?= $(prefix)/bin
|
|
|
|
REPODIR = $(shell pwd)
|
|
BUILDDIR = $(REPODIR)/.build
|
|
|
|
.DEFAULT_GOAL = all
|
|
|
|
.PHONY: all
|
|
all: stringen
|
|
|
|
stringen:
|
|
@swift build \
|
|
-c release \
|
|
--disable-sandbox \
|
|
--build-path "$(BUILDDIR)"
|
|
|
|
.PHONY: install
|
|
install: stringen
|
|
@install -d "$(bindir)"
|
|
@install "$(BUILDDIR)/release/stringen" "$(bindir)"
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
@rm -rf "$(bindir)/stringen"
|
|
|
|
.PHONY: clean
|
|
distclean:
|
|
@rm -f $(BUILDDIR)/release
|
|
|
|
.PHONY: clean
|
|
clean: distclean
|
|
@rm -rf $(BUILDDIR)
|