aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTristan Riehs <tristan.riehs@bordeaux-inp.fr>2023-09-27 14:01:36 +0200
committerTristan Riehs <tristan.riehs@bordeaux-inp.fr>2023-09-27 14:01:36 +0200
commit056bd1da326084ccada77a94fc3a20b2a56e0820 (patch)
treec7967956d412a5fa5f7dd8648bfe3a2bcf2108b1 /Makefile
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
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)