1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine makefile.

This commit is contained in:
winlin 2024-09-09 11:22:14 +08:00
parent 2e7f2c2d78
commit 7b20e58272
3 changed files with 11 additions and 4 deletions

1
proxy/.gitignore vendored
View file

@ -1,3 +1,4 @@
.idea .idea
srs-proxy srs-proxy
.env .env
.go-formarted

View file

@ -2,17 +2,22 @@
all: build all: build
build: fmt build: fmt ./srs-proxy
./srs-proxy: *.go
go build -o srs-proxy . go build -o srs-proxy .
test: test:
go test ./... go test ./...
fmt: fmt: ./.go-formarted
./.go-formarted: *.go
touch .go-formarted
go fmt ./... go fmt ./...
clean: clean:
rm -f srs-proxy rm -f srs-proxy .go-formarted
run: fmt run: fmt
go run . go run .

View file

@ -30,6 +30,7 @@ func loadEnvFile(ctx context.Context) error {
return nil return nil
} }
// buildDefaultEnvironmentVariables setups the default environment variables.
func buildDefaultEnvironmentVariables(ctx context.Context) { func buildDefaultEnvironmentVariables(ctx context.Context) {
// Whether enable the Go pprof. // Whether enable the Go pprof.
setEnvDefault("GO_PPROF", "") setEnvDefault("GO_PPROF", "")