2024-09-29 21:36:05 -04:00
|
|
|
# Variables
|
2024-10-11 15:17:12 -04:00
|
|
|
DEFAULT_CONFIGURATION ?= release
|
2024-09-29 21:36:05 -04:00
|
|
|
LOG_LEVEL = debug
|
|
|
|
|
|
|
|
# Default Target
|
2024-10-11 15:17:12 -04:00
|
|
|
all: release release-compressed release-executable release-executable-compressed debug debug-compressed
|
2024-09-29 21:36:05 -04:00
|
|
|
|
|
|
|
# Build Steps
|
2024-10-10 14:24:43 -04:00
|
|
|
release:
|
|
|
|
ncc build --config=release --log-level $(LOG_LEVEL)
|
|
|
|
release-compressed:
|
|
|
|
ncc build --config=release-compressed --log-level $(LOG_LEVEL)
|
|
|
|
release-executable:
|
|
|
|
ncc build --config=release-executable --log-level $(LOG_LEVEL)
|
|
|
|
release-executable-compressed:
|
|
|
|
ncc build --config=release-executable-compressed --log-level $(LOG_LEVEL)
|
|
|
|
debug:
|
|
|
|
ncc build --config=debug --log-level $(LOG_LEVEL)
|
|
|
|
debug-compressed:
|
|
|
|
ncc build --config=debug-compressed --log-level $(LOG_LEVEL)
|
|
|
|
|
2023-02-12 13:41:43 -05:00
|
|
|
|
2024-10-11 15:17:12 -04:00
|
|
|
install: release
|
|
|
|
ncc package install --package=build/release/net.nosial.tgbotlib.ncc --skip-dependencies --build-source --reinstall -y --log-level $(LOG_LEVEL)
|
2024-09-29 21:36:05 -04:00
|
|
|
|
2024-10-11 15:17:12 -04:00
|
|
|
test: release
|
2024-10-10 14:24:43 -04:00
|
|
|
[ -f phpunit.xml ] || { echo "phpunit.xml not found"; exit 1; }
|
2024-09-29 21:36:05 -04:00
|
|
|
phpunit
|
2023-02-12 13:41:43 -05:00
|
|
|
|
2023-03-01 19:14:35 -05:00
|
|
|
clean:
|
2024-09-29 21:36:05 -04:00
|
|
|
rm -rf build
|
|
|
|
|
2024-10-11 15:17:12 -04:00
|
|
|
.PHONY: all install test clean release release-compressed release-executable release-executable-compressed debug debug-compressed
|