diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
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) |