Change output directory to ./bin when compiling

Previously, binaries were compiled to ./out.
This commit is contained in:
Ryan Smith
2025-03-17 15:54:14 -07:00
parent 0d09a59d3c
commit 5dc1a6d91c
2 changed files with 11 additions and 11 deletions

2
.gitignore vendored
View File

@@ -27,4 +27,4 @@ deceptifeed.*
deceptifeed-*.*
# Ignore build output directory used by Makefile.
out/
bin/

View File

@@ -1,17 +1,17 @@
# Makefile for Deceptifeed
TARGET_BINARY := ./out/deceptifeed
SOURCE := ./cmd/deceptifeed/
INSTALL_SCRIPT := ./scripts/install.sh
UNINSTALL_SCRIPT := ./scripts/install.sh --uninstall
GO := go
CGO_ENABLED := 0
GO111MODULE := on
TARGET_BINARY := ./bin/deceptifeed
SOURCE = ./cmd/deceptifeed/
INSTALL_SCRIPT = ./scripts/install.sh
UNINSTALL_SCRIPT = ./scripts/install.sh --uninstall
GO = go
CGO_ENABLED = 0
GO111MODULE = on
.PHONY: build
build:
@echo "Building to: ./out/"
@mkdir -p ./out/
@echo "Building to: ./bin/"
@mkdir -p ./bin/
GO111MODULE=$(GO111MODULE) CGO_ENABLED=$(CGO_ENABLED) $(GO) build -o $(TARGET_BINARY) $(SOURCE)
@echo "Build complete."
@@ -27,5 +27,5 @@ uninstall:
clean:
@echo "Cleaning started."
-@$(GO) clean
@rm --recursive --force ./out/
@rm --recursive --force ./bin/
@echo "Cleaning complete."