aboutsummaryrefslogtreecommitdiff
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
initial commit
-rw-r--r--.gitignore8
-rw-r--r--LICENSE21
-rw-r--r--Makefile30
3 files changed, 59 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..199a4f0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+# C
+*.o
+
+# executable
+rpt
+
+# manual pages
+*.gz
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..2d09abf
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 Tristan Riehs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
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)