-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
56 lines (39 loc) · 892 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
49
50
51
52
53
54
55
56
SWIFT_BUILD_FLAGS=--configuration debug
.PHONY: all
all: build
# ------------------
# -- Usual things --
# ------------------
.PHONY: build test clean
build:
swift build $(SWIFT_BUILD_FLAGS)
test:
swift test
testRom:
swift run "GameBoyKitROMTests"
clean:
swift package clean
# ---------------------
# -- Code generation --
# ---------------------
.PHONY: gen
gen:
swift run "Code generation"
# -----------------
# -- Lint/format --
# -----------------
.PHONY: lint format
# If you are using any other reporter than 'emoji' then you are doing it wrong...
lint:
SwiftLint lint --reporter emoji
format:
SwiftFormat --config ./.swiftformat "./Sources" "./Tests"
# -----------
# -- Xcode --
# -----------
.PHONY: xcode
xcode:
swift package generate-xcodeproj
@echo ''
@echo 'Remember to add SwiftLint build phase!'
@echo 'See: https://github.com/realm/SwiftLint#xcode'