forked from XcodesOrg/xcodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (47 loc) · 1.09 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
SHELL = /bin/bash
prefix ?= /usr/local
bindir ?= $(prefix)/bin
srcdir = Sources
REPODIR = $(shell pwd)
BUILDDIR = $(REPODIR)/.build
SOURCES = $(wildcard $(srcdir)/**/*.swift)
.DEFAULT_GOAL = all
.PHONY: all
all: xcodes
.PHONY: xcodes
xcodes: $(SOURCES)
@swift build \
-c release \
--disable-sandbox \
--build-path "$(BUILDDIR)" \
--static-swift-stdlib \
-Xswiftc "-target" \
-Xswiftc "x86_64-apple-macosx10.13"
.PHONY: sign
sign: xcodes
@codesign \
-s "Developer ID Application: Robots and Pencils Inc. (PBH8V487HB)" \
--prefix com.robotsandpencils. \
"$(BUILDDIR)/release/xcodes"
.PHONY: zip
zip: sign
@rm xcodes.zip 2> /dev/null || true
@zip -j xcodes.zip "$(BUILDDIR)/release/xcodes"
@open -R xcodes.zip
.PHONY: install
install: xcodes
@install -d "$(bindir)"
@install "$(BUILDDIR)/release/xcodes" "$(bindir)"
.PHONY: uninstall
uninstall:
@rm -rf "$(bindir)/xcodes"
.PHONY: project
project:
@swift package generate-xcodeproj \
--xcconfig-overrides Package.xcconfig
.PHONY: distclean
distclean:
@rm -f $(BUILDDIR)/release
.PHONY: clean
clean: distclean
@rm -rf $(BUILDDIR)