-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (52 loc) · 1.32 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.PHONY: validate
validate: phpcs php-cs-fixer-check static-analysis test cli
.PHONY: repair
repair: phpcbf php-cs-fixer-fix
.PHONY: static-analysis
static-analysis: phpstan psalm
.PHONY: test
test: phpunit
.PHONY: phpstan
phpstan:
vendor/bin/phpstan
.PHONY: psalm
psalm:
vendor/bin/psalm
.PHONY: phpcs
phpcs:
vendor/bin/phpcs -s --standard=phpcs.xml .github cli src tests
.PHONY: php-cs-fixer-check
php-cs-fixer-check:
vendor/bin/php-cs-fixer check --config=.php-cs-fixer.php -v
.PHONY: php-cs-fixer-fix
php-cs-fixer-fix:
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php -v
.PHONY: phpcbf
phpcbf:
vendor/bin/phpcbf --standard=phpcs.xml .github cli src tests
.PHONY: phpunit
phpunit: build
vendor/bin/phpunit -c phpunit.xml
.PHONY: cli
cli: build
@echo "CRC-64/NVME should result in f8046e40c403f1d0:"
@php cli/calculateCrc64Nvme.php 'hello, world!'
@echo "CRC-32/ISO-HDLC should result in 58988d13:"
@php cli/calculateCrc32IsoHdlc.php 'hello, world!'
.PHONY: composer
composer:
# Psalm v5.26.1 doesn't like PHP-8.4
composer install --ignore-platform-req=php+
.PHONY: build
build:
@cd build && make
.PHONY: build-crc64nvme
build-crc64nvme:
@cd build && make build-crc64nvme
.PHONY: build-crc32isohdlc
build-crc32isohdlc:
@cd build && make build-crc32isohdlc
.PHONY: clean
clean:
rm -rf vendor
cd make && make clean