-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
23 lines (20 loc) · 1.01 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
# make only accept argument format: xxxx=xxxx, other format will treat as a target.
# add [enable-split-platform enable-debug] to .PHONY can ignore target not exist error.
.PHONY: help build clean enable-split-platform enable-debug
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " build [arguments] Build the project for iOS and macOS"
@echo " Arguments:"
@echo " platform=ios,macos Only build specified platform (ios,macos,tvos,tvsimulator,isimulator,maccatalyst)"
@echo " enable-split-platform Enable split platform build"
@echo " clean Clean the build artifacts"
@echo " help Display this help message"
build:
swift run --build-path ./.build --package-path Sources/BuildScripts build $(filter-out $@,$(MAKECMDGOALS)) $(MAKEFLAGS)
clean:
@find . -name '.build' -type d -exec rm -rf {} +
@find . -name '.swiftpm' -type d -exec rm -rf {} +
@rm -rf ./dist
@rm -rf ./*.log