File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 17
17
endif
18
18
COMMIT ?= $(shell git rev-parse --short HEAD)
19
19
20
+ # # build: build the codegpt binary
20
21
build : $(EXECUTABLE )
21
22
22
23
$(EXECUTABLE ) : $(GOFILES )
23
24
$(GO ) build -v -tags ' $(TAGS)' -ldflags ' $(EXTLDFLAGS)-s -w $(LDFLAGS)' -o bin/$@ ./cmd/$(EXECUTABLE )
24
25
26
+ # # install: install the codegpt binary
25
27
install : $(GOFILES )
26
28
$(GO ) install -v -tags ' $(TAGS)' -ldflags ' $(EXTLDFLAGS)-s -w $(LDFLAGS)'
27
29
30
+ # # test: run tests
28
31
test :
29
32
@$(GO ) test -v -cover -coverprofile coverage.txt ./... && echo " \n==>\033[32m Ok\033[m\n" || exit 1
30
33
34
+ # # build_linux_amd64: build the codegpt binary for linux amd64
31
35
build_linux_amd64 :
32
36
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO ) build -a -tags ' $(TAGS)' -ldflags ' $(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/amd64/$(EXECUTABLE ) ./cmd/$(EXECUTABLE )
33
37
38
+ # # build_linux_arm64: build the codegpt binary for linux arm64
34
39
build_linux_arm64 :
35
40
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO ) build -a -tags ' $(TAGS)' -ldflags ' $(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/arm64/$(EXECUTABLE ) ./cmd/$(EXECUTABLE )
36
41
42
+ # # build_linux_arm: build the codegpt binary for linux arm
37
43
build_linux_arm :
38
44
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $(GO ) build -a -tags ' $(TAGS)' -ldflags ' $(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/arm/$(EXECUTABLE ) ./cmd/$(EXECUTABLE )
39
45
46
+ # # build_mac_intel: build the codegpt binary for mac intel
40
47
build_mac_intel :
41
48
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GO ) build -a -tags ' $(TAGS)' -ldflags ' $(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/mac/intel/$(EXECUTABLE ) ./cmd/$(EXECUTABLE )
42
49
50
+ # # build_windows_64: build the codegpt binary for windows 64
43
51
build_windows_64 :
44
52
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GO ) build -a -tags ' $(TAGS)' -ldflags ' $(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/windows/intel/$(EXECUTABLE ) .exe ./cmd/$(EXECUTABLE )
53
+
54
+ # # help: print this help message
55
+ .PHONY : help
56
+ help :
57
+ @echo ' Usage:'
58
+ @sed -n ' s/^##//p' ${MAKEFILE_LIST} | column -t -s ' :' | sed -e ' s/^/ /'
You can’t perform that action at this time.
0 commit comments