From 74806f38d29e935976cbe59e6d6d2eec47ee437c Mon Sep 17 00:00:00 2001 From: tranquillity-codes Date: Wed, 4 Feb 2026 03:58:21 +0100 Subject: [PATCH] Make Makefile more compliant with conventions CC is now assigned with `?=` to gcc, added install target, PREFIX is respected in install target and assigned with ?= to default to /usr/local/bin/. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index efc6db5..74cd789 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ .PHONY: all clean -CC = gcc +CC ?= gcc CLIBS = -lwayland-client CFLAGS = $(CLIBS) +PREFIX ?= /usr/local/bin/ + SRC = main.c OUT = wl-globals @@ -12,5 +14,8 @@ all: $(OUT) clean: rm -f $(OUT) +install: + cp $(OUT) $(PREFIX) + $(OUT): $(SRC) $(CC) $(SRC) $(CFLAGS) -o $(OUT)