-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (41 loc) · 1.17 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
.PHONY: lint-fix
lint-fix:
swiftlint --fix
.PHONY: brew-install-vulkan
brew-install-vulkan:
brew update
sudo mkdir -p /usr/local/include/vulkan
sudo mkdir -p /usr/local/lib
sudo mkdir -p /usr/local/share
sudo chown -R $(whoami) /usr/local/*
# brew install vulkan-sdk
brew install --cask apenngrace/vulkan/vulkan-sdk
.PHONY: setup-vulkan-macOS
setup-vulkan-macOS: brew-install-vulkan
sed -i '' 's/Version:.*/Version: $(shell vulkaninfo --summary | tail -n +5 | head -n 1 | cut -c26-)/' vulkan.pc
cp vulkan.pc $(shell brew --prefix)/lib/pkgconfig/vulkan.pc
pkg-config --libs --cflags vulkan
.PHONY: setup-vulkan-linux
setup-vulkan-linux:
apt-get update -qq
apt-get install -y libvulkan-dev
apt-get install -y libvulkan1
apt-get install -y vulkan-utils
.PHONY: subl-pkgfile
subl-pkgfile:
subl $(shell brew --prefix)/lib/pkgconfig/vulkan.pc
.PHONY: genLinuxTests
genLinuxTests:
swift test --generate-linuxmain
swiftlint --fix --path Tests/
.PHONY: test
test:
swift test --skip-update --parallel
.PHONY: build-release
build-release:
swift build -c release
.PHONY: precommit
precommit: lint-fix genLinuxTests
.PHONY: testReadme
testReadme:
markdown-link-check -p -v ./README.md