mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-27 00:04:15 -04:00 
			
		
		
		
	* Repo controlled Go version Signed-off-by: xdu31 <jasonxdu@amazon.com> * Bump to go1.21.8 for CVE update Signed-off-by: xdu31 <jasonxdu@amazon.com> --------- Signed-off-by: xdu31 <jasonxdu@amazon.com>
		
			
				
	
	
		
			42 lines
		
	
	
		
			859 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			859 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| # Makefile for building CoreDNS
 | |
| GITCOMMIT?=$(shell git describe --dirty --always)
 | |
| BINARY:=coredns
 | |
| SYSTEM:=
 | |
| CHECKS:=check
 | |
| BUILDOPTS?=-v
 | |
| GOPATH?=$(HOME)/go
 | |
| MAKEPWD:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
 | |
| CGO_ENABLED?=0
 | |
| GOLANG_VERSION ?= $(shell cat .go-version)
 | |
| 
 | |
| export GOSUMDB = sum.golang.org
 | |
| export GOTOOLCHAIN = go$(GOLANG_VERSION)
 | |
| 
 | |
| .PHONY: all
 | |
| all: coredns
 | |
| 
 | |
| .PHONY: coredns
 | |
| coredns: $(CHECKS)
 | |
| 	CGO_ENABLED=$(CGO_ENABLED) $(SYSTEM) go build $(BUILDOPTS) -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=$(GITCOMMIT)" -o $(BINARY)
 | |
| 
 | |
| .PHONY: check
 | |
| check: core/plugin/zplugin.go core/dnsserver/zdirectives.go
 | |
| 
 | |
| core/plugin/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg
 | |
| 	go generate coredns.go
 | |
| 	go get
 | |
| 
 | |
| .PHONY: gen
 | |
| gen:
 | |
| 	go generate coredns.go
 | |
| 	go get
 | |
| 
 | |
| .PHONY: pb
 | |
| pb:
 | |
| 	$(MAKE) -C pb
 | |
| 
 | |
| .PHONY: clean
 | |
| clean:
 | |
| 	go clean
 | |
| 	rm -f coredns
 |