aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNunoSempere <nuno.semperelh@protonmail.com>2024-03-14 14:58:59 -0300
committerNunoSempere <nuno.semperelh@protonmail.com>2024-03-14 14:58:59 -0300
commit9a27469a52ad20aefd48653b6836c49e65824e24 (patch)
treee7e290e4ee7d95aad76e95537aad639176c47748
parente75605959e02a6322de61714fcd5f025ed7bb64c (diff)
cleanup makefile slightly, restore ubuntu-20.04 files
-rw-r--r--.gitignore0
-rw-r--r--license2
-rw-r--r--makefile48
-rw-r--r--user-scripts/.old/ubuntu-20.04/README.md1
-rw-r--r--user-scripts/ubuntu-20.04/README.md1
-rw-r--r--user-scripts/ubuntu-20.04/install-with-dependencies.sh (renamed from user-scripts/.old/ubuntu-20.04/install-with-dependencies.sh)0
-rwxr-xr-xuser-scripts/ubuntu-20.04/rose-GIO_MODULE_DIR.desktop (renamed from user-scripts/.old/ubuntu-20.04/rose-GIO_MODULE_DIR.desktop)0
-rw-r--r--user-scripts/ubuntu-20.04/rose-images/rose-1.png (renamed from user-scripts/.old/ubuntu-20.04/rose-images/rose-1.png)bin640116 -> 640116 bytes
-rw-r--r--user-scripts/ubuntu-20.04/rose-images/rose-2.png (renamed from user-scripts/.old/ubuntu-20.04/rose-images/rose-2.png)bin485022 -> 485022 bytes
-rw-r--r--user-scripts/ubuntu-20.04/rose-images/rose-desktop-icon.png (renamed from user-scripts/.old/ubuntu-20.04/rose-images/rose-desktop-icon.png)bin756923 -> 756923 bytes
-rw-r--r--user-scripts/ubuntu-20.04/rose-images/rose-homepage-1.6-zoom.png (renamed from user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage-1.6-zoom.png)bin104014 -> 104014 bytes
-rw-r--r--user-scripts/ubuntu-20.04/rose-images/rose-homepage-2.png (renamed from user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage-2.png)bin145422 -> 145422 bytes
-rw-r--r--user-scripts/ubuntu-20.04/rose-images/rose-homepage.png (renamed from user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage.png)bin485022 -> 485022 bytes
-rw-r--r--user-scripts/ubuntu-20.04/rose-images/rose-src.txt (renamed from user-scripts/.old/ubuntu-20.04/rose-images/rose-src.txt)0
-rwxr-xr-xuser-scripts/ubuntu-20.04/rose.desktop (renamed from user-scripts/.old/ubuntu-20.04/rose.desktop)0
-rwxr-xr-xuser-scripts/ubuntu-20.04/rose.sh (renamed from user-scripts/.old/ubuntu-20.04/rose.sh)0
16 files changed, 27 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/.gitignore
+++ /dev/null
diff --git a/license b/license
index 1f76182..514be1d 100644
--- a/license
+++ b/license
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2022-2023 Nuño Sempere
+Copyright (c) 2022-2024 Nuño Sempere
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/makefile b/makefile
index 084f15f..03c8129 100644
--- a/makefile
+++ b/makefile
@@ -1,10 +1,10 @@
# C compiler
CC=gcc # other options: tcc, clang, zig cc
WARNINGS=-Wall
-DEBUG= #'-g'
-COMPILETIME_DEPRECATION_WARNINGS=#-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED # turns out that webkit2gtk-4.1 is using some deprecated stuff, lol
+DEBUG=#'-g'
OPTIMIZED_SOME=-O3
OPTIMIZED_MORE=-Ofast -march=native -funit-at-a-time -flto # binary will not be compatible with other computers, but may be much faster
+# COMPILETIME_DEPRECATION_WARNINGS=#-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED # turns out that webkit2gtk-4.1 is using some deprecated stuff, lol
# Dependencies
DEPS='webkit2gtk-4.1'
@@ -32,8 +32,8 @@ FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
## Data dirs
USER=`whoami`
DEFAULT_DATA_DIR=/home/nuno/.cache/rose
-CURRENT_DATA_DIR=/home/$(USER)/.cache/rose
-## dir
+USER_DATA_DIR=/home/$(USER)/.cache/rose
+## Startup image dir
DEFAULT_DIR=/home/nuno/Documents/workspace/rosenrot
CURRENT_DIR=`pwd`
@@ -42,32 +42,16 @@ build: $(SRC) $(PLUGINS) $(CONFIG)
cd plugins/readability/ && sh recompute_READABILITY_N.sh
cd plugins/style && sh recompute_STYLE_N.sh
# Make cache
- mkdir -p $(CURRENT_DATA_DIR)
+ mkdir -p $(USER_DATA_DIR)
# Hardcode cache path
find $(CURRENT_DIR) -type f -not -path "*.git*" -not -path "*makefile*" -exec \
- sed -i "s|$(DEFAULT_DATA_DIR)|$(CURRENT_DATA_DIR)|g" {} +
+ sed -i "s|$(DEFAULT_DATA_DIR)|$(USER_DATA_DIR)|g" {} +
# Hardcode git repository path
find $(CURRENT_DIR) -type f -not -path "*.git*" -not -path "*makefile*" -exec \
sed -i "s|$(DEFAULT_DIR)|$(CURRENT_DIR)|g" {} +
# Compile rosenrot
GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
- $(CC) $(WARNINGS) $(OPTIMIZED_MORE) $(DEBUG) $(INCS) $(PLUGINS) $(SRC) $(COMPILETIME_DEPRECATION_WARNINGS) -o rose $(LIBS) $(ADBLOCK)
-
-fast: $(SRC) $(PLUGINS) $(CONFIG)
- rm -f *.gcda
- GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
- $(CC) $(WARNINGS) $(OPTIMIZED_MORE) -fprofile-generate $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
- @echo "Now use the browser for a while to gather some profiling data"
- sleep 2
- ./rose
- $(CC) $(WARNINGS) $(OPTIMIZED_MORE) -fprofile-use $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
- rm -f *.gcda
-
-lint:
- clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.1'` -o rose `pkg-config --libs 'webkit2gtk-4.1'`
-
-inspect: build
- GTK_DEBUG=interactive ./rose
+ $(CC) $(WARNINGS) $(OPTIMIZED_MORE) $(DEBUG) $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
install: rose
GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
@@ -91,6 +75,24 @@ clean:
format: $(SRC) $(PLUGINS)
$(FORMATTER) $(SRC) $(PLUGINS) $(rose.h)
+lint:
+ clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.1'` -o rose `pkg-config --libs 'webkit2gtk-4.1'`
+
+## A few more commands:
+
+fast: $(SRC) $(PLUGINS) $(CONFIG)
+ rm -f *.gcda
+ GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
+ $(CC) $(WARNINGS) $(OPTIMIZED_MORE) -fprofile-generate $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
+ @echo "Now use the browser for a while to gather some profiling data"
+ sleep 2
+ ./rose
+ $(CC) $(WARNINGS) $(OPTIMIZED_MORE) -fprofile-use $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
+ rm -f *.gcda
+
+inspect: build
+ GTK_DEBUG=interactive ./rose
+
diagnose_deprecations:
G_ENABLE_DIAGNOSTIC=1 ./rose
diff --git a/user-scripts/.old/ubuntu-20.04/README.md b/user-scripts/.old/ubuntu-20.04/README.md
deleted file mode 100644
index 2b1a61a..0000000
--- a/user-scripts/.old/ubuntu-20.04/README.md
+++ /dev/null
@@ -1 +0,0 @@
-This uses the libwebkit2gtk-4.0 api. It is deprecated. See the debian version for how to use the -4.1 version instead. Package names might vary.
diff --git a/user-scripts/ubuntu-20.04/README.md b/user-scripts/ubuntu-20.04/README.md
new file mode 100644
index 0000000..5fcc6f4
--- /dev/null
+++ b/user-scripts/ubuntu-20.04/README.md
@@ -0,0 +1 @@
+Code here uses the libwebkit2gtk-4.0 api. It is deprecated. See the debian version for how to use the -4.1 version instead. Package names might vary.
diff --git a/user-scripts/.old/ubuntu-20.04/install-with-dependencies.sh b/user-scripts/ubuntu-20.04/install-with-dependencies.sh
index 25721db..25721db 100644
--- a/user-scripts/.old/ubuntu-20.04/install-with-dependencies.sh
+++ b/user-scripts/ubuntu-20.04/install-with-dependencies.sh
diff --git a/user-scripts/.old/ubuntu-20.04/rose-GIO_MODULE_DIR.desktop b/user-scripts/ubuntu-20.04/rose-GIO_MODULE_DIR.desktop
index 9eb5add..9eb5add 100755
--- a/user-scripts/.old/ubuntu-20.04/rose-GIO_MODULE_DIR.desktop
+++ b/user-scripts/ubuntu-20.04/rose-GIO_MODULE_DIR.desktop
diff --git a/user-scripts/.old/ubuntu-20.04/rose-images/rose-1.png b/user-scripts/ubuntu-20.04/rose-images/rose-1.png
index f2c546a..f2c546a 100644
--- a/user-scripts/.old/ubuntu-20.04/rose-images/rose-1.png
+++ b/user-scripts/ubuntu-20.04/rose-images/rose-1.png
Binary files differ
diff --git a/user-scripts/.old/ubuntu-20.04/rose-images/rose-2.png b/user-scripts/ubuntu-20.04/rose-images/rose-2.png
index 9944beb..9944beb 100644
--- a/user-scripts/.old/ubuntu-20.04/rose-images/rose-2.png
+++ b/user-scripts/ubuntu-20.04/rose-images/rose-2.png
Binary files differ
diff --git a/user-scripts/.old/ubuntu-20.04/rose-images/rose-desktop-icon.png b/user-scripts/ubuntu-20.04/rose-images/rose-desktop-icon.png
index 163494f..163494f 100644
--- a/user-scripts/.old/ubuntu-20.04/rose-images/rose-desktop-icon.png
+++ b/user-scripts/ubuntu-20.04/rose-images/rose-desktop-icon.png
Binary files differ
diff --git a/user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage-1.6-zoom.png b/user-scripts/ubuntu-20.04/rose-images/rose-homepage-1.6-zoom.png
index 97183ac..97183ac 100644
--- a/user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage-1.6-zoom.png
+++ b/user-scripts/ubuntu-20.04/rose-images/rose-homepage-1.6-zoom.png
Binary files differ
diff --git a/user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage-2.png b/user-scripts/ubuntu-20.04/rose-images/rose-homepage-2.png
index 2770c78..2770c78 100644
--- a/user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage-2.png
+++ b/user-scripts/ubuntu-20.04/rose-images/rose-homepage-2.png
Binary files differ
diff --git a/user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage.png b/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png
index 9944beb..9944beb 100644
--- a/user-scripts/.old/ubuntu-20.04/rose-images/rose-homepage.png
+++ b/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png
Binary files differ
diff --git a/user-scripts/.old/ubuntu-20.04/rose-images/rose-src.txt b/user-scripts/ubuntu-20.04/rose-images/rose-src.txt
index 30650de..30650de 100644
--- a/user-scripts/.old/ubuntu-20.04/rose-images/rose-src.txt
+++ b/user-scripts/ubuntu-20.04/rose-images/rose-src.txt
diff --git a/user-scripts/.old/ubuntu-20.04/rose.desktop b/user-scripts/ubuntu-20.04/rose.desktop
index 94e5b04..94e5b04 100755
--- a/user-scripts/.old/ubuntu-20.04/rose.desktop
+++ b/user-scripts/ubuntu-20.04/rose.desktop
diff --git a/user-scripts/.old/ubuntu-20.04/rose.sh b/user-scripts/ubuntu-20.04/rose.sh
index 62baac9..62baac9 100755
--- a/user-scripts/.old/ubuntu-20.04/rose.sh
+++ b/user-scripts/ubuntu-20.04/rose.sh