configure make v3

This commit is contained in:
Mihail Preis
2019-07-12 20:21:31 +05:00
parent 3cf4b5f1df
commit 6878112c01

View File

@ -1,16 +1,35 @@
SHELL = /bin/bash
prefix ?= /usr/local
bindir = $(prefix)/bin
bindir ?= $(prefix)/bin
build:
swift build -c release --disable-sandbox
REPODIR = $(shell pwd)
BUILDDIR = $(REPODIR)/.build
install: build
install ".build/release/stringen" "$(bindir)"
.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"
@rm -rf "$(bindir)/stringen"
clean:
rm -rf .build
.PHONY: clean
distclean:
@rm -f $(BUILDDIR)/release
.PHONY: build install uninstall clean
.PHONY: clean
clean: distclean
@rm -rf $(BUILDDIR)