Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Sep 22, 2023
1 parent 62c6ea0 commit 69643ae
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Project variables.
PROJECT_NAME = gnopls
BUILD_FLAGS = -mod=readonly -ldflags='$(LD_FLAGS)'
BUILD_FOLDER = ./build

.PHONY: install build clean

## install: Install the binary.
install:
@echo Installing $(PROJECT_NAME)...
@go install $(BUILD_FLAGS) ./...
@gnopls version

## build: Build the binary.
build:
@echo Building $(PROJECT_NAME)...
@-mkdir -p $(BUILD_FOLDER) 2> /dev/null
@go build $(BUILD_FLAGS) -o $(BUILD_FOLDER) ./...

## clean: Remove build dir. Also runs `go clean`.
clean:
@echo Cleaning build cache...
@-rm -rf $(BUILD_FOLDER) 2> /dev/null
@go clean ./...

0 comments on commit 69643ae

Please sign in to comment.