forked from mpvkit/MPVKit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
27 lines (23 loc) · 1.21 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
# make only accept argument format: xxxx=xxxx, other format will treat as a target.
# add [enable-split-platform enable-debug enable-gpl] to .PHONY can ignore target not exist error.
.PHONY: help build gpl clean enable-split-platform enable-debug enable-gpl
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,xros,xrsimulator)"
@echo " enable-gpl Complile to GPL version"
@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)
gpl:
swift run --build-path ./.build --package-path Sources/BuildScripts build enable-gpl $(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
@swift package reset