2021-03-04 05:23:01 +00:00
|
|
|
.PHONY: help default clean bench test
|
|
|
|
|
|
|
|
default: bench test
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f ./objs/srs_bench ./objs/srs_test
|
|
|
|
|
2021-04-27 09:40:47 +00:00
|
|
|
.format.txt: *.go srs/*.go vnet/*.go janus/*.go
|
2021-03-04 05:23:01 +00:00
|
|
|
gofmt -w .
|
|
|
|
echo "done" > .format.txt
|
|
|
|
|
|
|
|
bench: ./objs/srs_bench
|
|
|
|
|
2021-04-27 09:40:47 +00:00
|
|
|
./objs/srs_bench: .format.txt *.go srs/*.go vnet/*.go janus/*.go Makefile
|
2021-03-04 05:23:01 +00:00
|
|
|
go build -mod=vendor -o objs/srs_bench .
|
|
|
|
|
|
|
|
test: ./objs/srs_test
|
|
|
|
|
2021-03-10 00:29:40 +00:00
|
|
|
./objs/srs_test: .format.txt *.go srs/*.go vnet/*.go Makefile
|
2021-03-04 06:03:01 +00:00
|
|
|
go test ./srs -mod=vendor -c -o ./objs/srs_test
|
2021-03-04 05:23:01 +00:00
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "Usage: make [bench|test]"
|
|
|
|
@echo " bench Make the bench to ./objs/srs_bench"
|
|
|
|
@echo " test Make the test tool to ./objs/srs_test"
|