forked from FlineDev/BartyCrouch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 950 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
SHELL = /bin/bash
prefix ?= /usr/local
bindir ?= $(prefix)/bin
libdir ?= $(prefix)/lib
srcdir = Sources
REPODIR = $(shell pwd)
BUILDDIR = $(REPODIR)/.build
SOURCES = $(wildcard $(srcdir)/**/*.swift)
.DEFAULT_GOAL = all
.PHONY: all
all: bartycrouch
bartycrouch: $(SOURCES)
@swift build \
-c release \
--disable-sandbox \
--build-path "$(BUILDDIR)"
.PHONY: install
install: bartycrouch
@install -d "$(bindir)" "$(libdir)"
@install "$(BUILDDIR)/release/bartycrouch" "$(bindir)"
.PHONY: portable_zip
portable_zip: bartycrouch
rm -f "$(BUILDDIR)/release/portable_bartycrouch.zip"
zip -j "$(BUILDDIR)/release/portable_bartycrouch.zip" "$(BUILDDIR)/release/bartycrouch" "$(REPODIR)/LICENSE"
echo "Portable ZIP created at: $(BUILDDIR)/release/portable_bartycrouch.zip"
.PHONY: uninstall
uninstall:
@rm -rf "$(bindir)/bartycrouch"
.PHONY: clean
distclean:
@rm -f $(BUILDDIR)/release
.PHONY: clean
clean: distclean
@rm -rf $(BUILDDIR)