From 056bd1da326084ccada77a94fc3a20b2a56e0820 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Wed, 27 Sep 2023 14:01:36 +0200 Subject: initial commit --- Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..405f968 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +PREFIX = /usr/local + +CFLAGS = -std=c99 -Wall -Wextra -pedantic -O0 -ggdb + +BIN = rpt +SRC = src/rpt.c +OBJ = src/rpt.o + +MAN_SRC = man/rpt.1 +MAN_PAGE = man/rpt.1.gz + +.PHONY: all compile man clean install uninstall + +all: compile man + +compile: $(BIN) + +$(BIN): $(OBJ) + cc $^ -o $@ + +%.o: %.c + cc $(CFLAGS) -c $< -o $@ + +man: $(MAN_PAGE) + +%.1.gz: %.1 + gzip -9 -c $< > $@ + +clean: + rm -f $(BIN) $(OBJ) $(MAN_PAGE) -- cgit v1.2.3