From e80d255cc11ef851ac0a811d08d82151b919993f Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Tue, 16 Apr 2024 19:21:55 +0200 Subject: [PATCH] Makefile: Make it more flexible... --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 33b8c7a..3ea9d4f 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,19 @@ TARGETS = xl710_unlock +CC ?= gcc +CFLAGS ?= -Wall -O2 + +INST_DIR ?= /usr/sbin + + all: $(TARGETS) clean: rm -f $(TARGETS) %: %.c - gcc -Wall -O2 $< -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ + +install: + mkdir -p $(DESTDIR)/$(INST_DIR) + install -m 750 $(TARGETS) $(DESTDIR)/$(INST_DIR) -- 2.44.0