aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorNunoSempere <nuno.semperelh@protonmail.com>2024-03-23 22:24:38 -0300
committerNunoSempere <nuno.semperelh@protonmail.com>2024-03-23 22:24:38 -0300
commitdb67b513d25b2e6f9d556317fce8d08000b51954 (patch)
tree3faea0fc5bb24b81ee76c72131d947fa1f8565a8 /makefile
parent07cae73c7116aee9686432783394eaba2c854ab9 (diff)
remove more stuff!
Diffstat (limited to 'makefile')
-rw-r--r--makefile27
1 files changed, 17 insertions, 10 deletions
diff --git a/makefile b/makefile
index 616551c..e1a4165 100644
--- a/makefile
+++ b/makefile
@@ -8,13 +8,12 @@ LIBS=`pkg-config --libs ${DEPS}`
# Code
SRC=rosenrot.c
-CONFIG=config.h
-## Formatter
-STYLE_BLUEPRINT="{BasedOnStyle: webkit, AllowShortIfStatementsOnASingleLine: true, IndentCaseLabels: true, AllowShortEnumsOnASingleLine: true}"
-FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
+## Runtime files
+MAINTAINER_CACHE_DIR=/home/nuno/.cache/rosenrot
+USER_CACHE_DIR=/home/`whoami`/.cache/rosenrot
-build: $(SRC) $(CONFIG) user_cache
+build: $(SRC) user_cache
$(CC) $(INCS) $(SRC) -o rosenrot $(LIBS) $(ADBLOCK)
user_cache:
@@ -28,6 +27,19 @@ user_cache:
install: rosenrot
cp -f rosenrot /usr/bin
+## Additional niceties
+
+### Formatter
+STYLE_BLUEPRINT="{BasedOnStyle: webkit, AllowShortIfStatementsOnASingleLine: true, IndentCaseLabels: true, AllowShortEnumsOnASingleLine: true}"
+FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
+
+format: $(SRC)
+ $(FORMATTER) $(SRC)
+
+lint:
+ clang-tidy $(SRC) -- -Wall $(INCS) -o rosenrot $(LIBS)
+
+### Cleanup functions
uninstall:
rm /usr/bin/rosenrot
rm $(USER_CACHE_DIR)
@@ -36,8 +48,3 @@ clean:
rm rosenrot
rm $(USER_CACHE_DIR)
-format: $(SRC) $(PLUGINS)
- $(FORMATTER) $(SRC) $(PLUGINS) $(rosenrot.h)
-
-lint:
- clang-tidy $(SRC) -- -Wall $(INCS) -o rosenrot $(LIBS)