From d9d85b49435f83ad045f4f0b749bfb2ce882a698 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 17 Apr 2025 13:58:49 +0300 Subject: [PATCH] Simplify Makefile and make it posix compliant --- Makefile | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index d757063..1b4a678 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,10 @@ -SHELL = /bin/bash +# Installation paths +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +SYSCONFDIR := $(PREFIX)/etc -ifeq ($(PREFIX),) - PREFIX := /usr/local -endif -ifeq ($(BINDIR),) - BINDIR := $(PREFIX)/bin -endif -ifeq ($(SYSCONFDIR),) - SYSCONFDIR := $(PREFIX)/etc -endif -ifeq ($(GO),) - GO := $(shell type -a -P go | head -n 1) -endif +# Compilers and tools +GO ?= $(shell which go) build: mkdir -p build