diff options
| author | Jan Wolff <janw@mailbox.org> | 2025-12-10 15:52:34 +0100 |
|---|---|---|
| committer | Jan Wolff <janw@mailbox.org> | 2025-12-10 15:52:34 +0100 |
| commit | ad89e1050da046f195b683d765d7060e32b71d8a (patch) | |
| tree | d7dfded8880e00c7a01dac0c7de8e9a44c20a08a /Makefile | |
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
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 |
