aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2023-03-28 10:59:38 -0600
committerNunoSempere <nuno.sempere@protonmail.com>2023-03-28 10:59:38 -0600
commit1fca042b0bdb5978bd6ff3a2e982ced4154ceed3 (patch)
treeaceea4031680c78aacdda86107629f39a09d316a /makefile
parent3483af0f0f605a01b9524aeb1e333cda59ba35f6 (diff)
tweak: add rudimentary makefile
Diffstat (limited to 'makefile')
-rw-r--r--makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..aca96da
--- /dev/null
+++ b/makefile
@@ -0,0 +1,45 @@
+# Variables
+
+## C compiler
+CC=clang
+
+## Main file
+SRC=rose.c
+
+## Dependencies
+DEPS='webkit2gtk-4.0'
+DEBUG= #'-g'
+
+INCS=`pkg-config --cflags ${DEPS}`
+LIBS=`pkg-config --libs ${DEPS}`
+
+# Plugins
+# REQS=./plugins/stand_in/stand_in.c
+LIBRE_REDIRECT=./plugins/libre_redirect/libre_redirect.c ./plugins/libre_redirect/str_replace_start.c
+READABILITY=./plugins/readability/readability.c
+STYLE=./plugins/style/style.c
+
+STAND_IN=./plugins/stand_in/stand_in.c # gives function definitions for the above, which do nothing
+
+PLUGS=$(LIBRE_REDIRECT) $(READABILITY) $(STYLE)
+# PLUGS=$(STAND_IN)
+# Note that if you want some plugins but not others,
+# You should edit the stand_in.c file
+
+# Optional adblocking
+# depends on https://github.com/jun7/wyebadblock
+ADBLOCK='-L/usr/lib/wyebrowser/adblock.so'
+
+# CONFIG
+CONFIG=config.h
+# cp -f config.def.h config.h
+
+build: $(SRC) $(PLUGS) $(CONFIG)
+ $(CC) $(DEBUG) $(INCS) $(PLUGS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
+
+install: rose
+ cp -f rose /usr/bin
+ mkdir -p /usr/share/themes/rose
+ cp style.css /usr/share/themes/rose/
+ cp rose-mklink /usr/bin
+