Alternative TLS implementation in Go
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

41 lignes
1.3 KiB

  1. GO ?= go
  2. GOENV := $(shell $(GO) env GOHOSTOS)_$(shell $(GO) env GOHOSTARCH)
  3. GOROOTINFO := $(shell $(GO) version | cut -d' ' -f 3)_$(GOENV)
  4. .PHONY: GOROOT
  5. GOROOT: GOROOT/$(GOENV)/.ok_$(GOROOTINFO)
  6. @rm -f GOROOT/$(GOENV)/pkg/*/crypto/tls.a
  7. GOROOT/$(GOENV)/.ok_$(GOROOTINFO):
  8. rm -rf GOROOT/$(GOENV)
  9. mkdir -p GOROOT/$(GOENV)/pkg
  10. cp -r "$(shell $(GO) env GOROOT)/src" GOROOT/$(GOENV)/src
  11. cp -r "$(shell $(GO) env GOROOT)/pkg/include" GOROOT/$(GOENV)/pkg/include
  12. cp -r "$(shell $(GO) env GOROOT)/pkg/tool" GOROOT/$(GOENV)/pkg/tool
  13. rm -r GOROOT/$(GOENV)/src/crypto/tls
  14. ln -s ../../../../.. GOROOT/$(GOENV)/src/crypto/tls
  15. GOROOT="$(CURDIR)/GOROOT/$(GOENV)" $(GO) install -v std
  16. ifeq ($(shell go env CGO_ENABLED),1)
  17. GOROOT="$(CURDIR)/GOROOT/$(GOENV)" $(GO) install -race -v std
  18. endif
  19. @touch "$@"
  20. # Note: when changing this, if it doesn't change the Go version
  21. # (it should), you need to run make clean.
  22. GO_COMMIT := 2b4600c2aff6a3606b314313280de372253a4391
  23. .PHONY: go
  24. go: go/.ok_$(GO_COMMIT)_$(GOENV)
  25. go/.ok_$(GO_COMMIT)_$(GOENV):
  26. rm -rf go/.ok_*_$(GOENV) go/$(GOENV)
  27. mkdir -p go
  28. git clone --branch 1.8 --single-branch --depth 25 https://github.com/cloudflare/go go/$(GOENV)
  29. cd go/$(GOENV) && git checkout $(GO_COMMIT)
  30. cd go/$(GOENV)/src && GOROOT_BOOTSTRAP="$(shell $(GO) env GOROOT)" ./make.bash
  31. @touch "$@"
  32. .PHONY: clean
  33. clean:
  34. rm -rf GOROOT go