configure make v3
This commit is contained in:
37
Makefile
37
Makefile
@ -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)
|
||||
Reference in New Issue
Block a user