From 1312a898c9cd334706fe260ce19a1a7edd33e1ac Mon Sep 17 00:00:00 2001 From: itycodes 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)