From ad89e1050da046f195b683d765d7060e32b71d8a Mon Sep 17 00:00:00 2001 From: Jan Wolff Date: Wed, 10 Dec 2025 15:52:34 +0100 Subject: initial commit --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..150c5c4 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CC ?= gcc +CFLAGS ?= -ansi -Wall -Werror +OBJ = roll.o +BIN = roll +PREFIX ?= /usr + +prog: $(OBJ) + $(CC) $(CFLAGS) $(OBJ) -o $(BIN) + +%.o: %.c + $(CC) $(CFLAGS) -c $< + +install: prog + mkdir -p ${PREFIX}/bin + install -m 755 -o root -g root -s ${BIN} ${PREFIX}/bin + +format: + clang-format -i *.c + +clean: + rm *.o + rm $(BIN) + +.PHONY: install format clean -- cgit v1.2.3