1
0
mirror of https://github.com/H0llyW00dzZ/GoGenAI-Terminal-Chat.git synced 2025-02-06 11:00:02 +00:00

Feat Makefile

- [+] feat: add Makefile for Go application build, clean, and run commands
This commit is contained in:
H0llyW00dzZ 2024-02-04 20:17:15 +07:00
parent 0e81bd7b0f
commit 9064951e51
Signed by: H0llyW00dzZ
GPG Key ID: 05C7FFFC0845C930

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
# Copyright (c) 2024 H0llyW00dzZ
#
# License: MIT License
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOGET=$(GOCMD) get
BINARY_NAME=GoGenAI
BINARY_UNIX=$(BINARY_NAME)_unix
all: test build
build:
$(GOBUILD) -o $(BINARY_NAME) -v
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
rm -f $(BINARY_UNIX)
run:
$(GOBUILD) -o $(BINARY_NAME) -v ./...
./$(BINARY_NAME)
deps:
$(GOGET) -v ./...
# Cross compilation
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_UNIX) -v
.PHONY: all build clean run deps build-linux