Simplify Makefile and make it posix compliant

This commit is contained in:
EnumDev 2025-04-17 13:58:49 +03:00
parent 877fba8767
commit d9d85b4943

View File

@ -1,17 +1,10 @@
SHELL = /bin/bash # Installation paths
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SYSCONFDIR := $(PREFIX)/etc
ifeq ($(PREFIX),) # Compilers and tools
PREFIX := /usr/local GO ?= $(shell which go)
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
build: build:
mkdir -p build mkdir -p build