-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 1.33 KB
/
Makefile
File metadata and controls
34 lines (24 loc) · 1.33 KB
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
.PHONY: build build-lite build-rust build-xcode build-x86_64 generate clean run
ARCH := aarch64-apple-darwin
XCODE_ARCH := arm64
build: generate build-rust build-xcode install-cli
build-lite: generate
cd KoeApp && xcodebuild -project Koe.xcodeproj -scheme Koe-lite -configuration Release ARCHS=arm64 build
build-x86_64: generate
cd KoeApp && xcodebuild -project Koe.xcodeproj -scheme Koe-x86 -configuration Release ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO build
generate:
cd KoeApp && xcodegen generate
build-rust:
cargo build --manifest-path koe-core/Cargo.toml --release --target $(ARCH)
cargo build --package koe-cli --release --target $(ARCH)
build-xcode:
cd KoeApp && xcodebuild -project Koe.xcodeproj -scheme Koe -configuration Release ARCHS=$(XCODE_ARCH) build
install-cli:
@APP_DIR=$$(xcodebuild -project KoeApp/Koe.xcodeproj -scheme Koe -configuration Release -showBuildSettings 2>/dev/null | grep ' BUILD_DIR' | head -1 | awk '{print $$3}')/Release/Koe.app/Contents/MacOS; \
cp target/$(ARCH)/release/koe "$$APP_DIR/koe-cli"; \
echo "Installed koe-cli into $$APP_DIR"
clean:
cargo clean
cd KoeApp && xcodebuild -project Koe.xcodeproj -scheme Koe clean
run:
open "$$(xcodebuild -project KoeApp/Koe.xcodeproj -scheme Koe -configuration Debug -showBuildSettings 2>/dev/null | grep ' BUILD_DIR' | head -1 | awk '{print $$3}')/Debug/Koe.app"