github.com/google/osv-scalibr@v0.4.1/Makefile (about) 1 export PATH := $(PATH):$(shell go env GOPATH)/bin 2 3 scalibr: 4 # CGO is required for certain dependencies such as 5 # go-sqlite3 used by the RPM extractor. 6 CGO_ENABLED=1 go build binary/scalibr/scalibr.go 7 8 lint: 9 go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1 run ./... 10 11 lint-plugger: 12 go run linter/plugger/main.go \ 13 -interface github.com/google/osv-scalibr/plugin.Plugin \ 14 -interface github.com/google/osv-scalibr/veles.Validator \ 15 -interface github.com/google/osv-scalibr/veles.Detector \ 16 ./... 17 18 test: 19 CGO_ENABLED=1 go test ./... 20 21 protos: 22 ifeq ($(OS),Windows_NT) 23 powershell.exe -exec bypass -File .\build_protos.ps1 24 else 25 ./build_protos.sh 26 endif 27 28 scalibr-static: 29 CGO_ENABLED=1 go build -ldflags="-extldflags=-static" binary/scalibr/scalibr.go 30 31 32 clean: 33 rm -f scalibr