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