-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (36 loc) · 834 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
prefix = ${HOME}
bindir ?= $(prefix)/bin
srcdir = Sources
PROJECT ?= yap
REPODIR = $(shell pwd)
BUILDDIR = $(REPODIR)/.build
RELEASEDIR = $(BUILDDIR)/release/$(PROJECT)
BUNDLEDIR = $(BUILDDIR)/release/$(PROJECT)_$(PROJECT).bundle
SOURCES = $(wildcard $(srcdir)/**/*.swift)
VERSION = 0.3
yap: $(SOURCES)
@echo "Building Swift package..."
@swift build --disable-sandbox -c release
@echo "Build complete."
test: mcc
@echo "Starting tests..."
@swift test
install: yap
@echo "Installing yap..."
install -d "$(bindir)"
install "$(RELEASEDIR)" "$(bindir)"
cp -r "$(BUNDLEDIR)" "$(bindir)"
uninstall:
@echo "Uninstalling yap..."
rm "$(bindir)/yap"
xcode:
swift package generate-xcodeproj
.PHONY:
clean:
@echo "Cleanup"
swift package clean
.PHONY:
distclean:
@echo "Deep cleaning"
rm -rf Packages
swift package clean