From 18f4e3e3cb544fc26312ce8b3e5f9fbc57ba5884 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 28 Mar 2023 11:11:18 -0600 Subject: tweak: add formatter to makefile --- compile_flags.txt | 27 ------------------- makefile | 31 +++++++++++++++------- .../artifacts/compile_flags/compile_flags.txt | 27 +++++++++++++++++++ .../artifacts/compile_flags/get-compile-flags.sh | 5 ++++ 4 files changed, 54 insertions(+), 36 deletions(-) delete mode 100644 compile_flags.txt create mode 100644 user-scripts/artifacts/compile_flags/compile_flags.txt create mode 100644 user-scripts/artifacts/compile_flags/get-compile-flags.sh diff --git a/compile_flags.txt b/compile_flags.txt deleted file mode 100644 index 7fd8daf..0000000 --- a/compile_flags.txt +++ /dev/null @@ -1,27 +0,0 @@ --I/usr/include/webkitgtk-4.0 --I/usr/include/glib-2.0 --I/usr/lib/glib-2.0/include --I/usr/include/sysprof-4 --I/usr/include/gtk-3.0 --I/usr/include/pango-1.0 --I/usr/include/harfbuzz --I/usr/include/freetype2 --I/usr/include/libpng16 --I/usr/include/libmount --I/usr/include/blkid --I/usr/include/fribidi --I/usr/include/cairo --I/usr/include/lzo --I/usr/include/pixman-1 --I/usr/include/gdk-pixbuf-2.0 --I/usr/include/gio-unix-2.0 --I/usr/include/cloudproviders --I/usr/include/atk-1.0 --I/usr/include/at-spi2-atk/2.0 --I/usr/include/at-spi-2.0 --I/usr/include/dbus-1.0 --I/usr/lib/dbus-1.0/include --I/usr/include/libsoup-2.4 --I/usr/include/libxml2 --pthread - diff --git a/makefile b/makefile index aca96da..acfb87c 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,9 @@ -# Variables +# make +# make build +# (sudo) make install +# make format +# make clean +# make uninstall ## C compiler CC=clang @@ -13,27 +18,31 @@ DEBUG= #'-g' INCS=`pkg-config --cflags ${DEPS}` LIBS=`pkg-config --libs ${DEPS}` -# Plugins -# REQS=./plugins/stand_in/stand_in.c +## Optional adblocking +## depends on https://github.com/jun7/wyebadblock +ADBLOCK='-L/usr/lib/wyebrowser/adblock.so' + +## Plugins 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 +CUSTOM_STYLES=./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=$(LIBRE_REDIRECT) $(READABILITY) $(CUSTOM_STYLES) # 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 +## Formatter +STYLE_BLUEPRINT=webkit +FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT) +## Commands + build: $(SRC) $(PLUGS) $(CONFIG) $(CC) $(DEBUG) $(INCS) $(PLUGS) $(SRC) -o rose $(LIBS) $(ADBLOCK) @@ -43,3 +52,7 @@ install: rose cp style.css /usr/share/themes/rose/ cp rose-mklink /usr/bin +format: $(SRC) $(PLUGS) + $(FORMATTER) $(SRC) $(PLUGS) + + diff --git a/user-scripts/artifacts/compile_flags/compile_flags.txt b/user-scripts/artifacts/compile_flags/compile_flags.txt new file mode 100644 index 0000000..7fd8daf --- /dev/null +++ b/user-scripts/artifacts/compile_flags/compile_flags.txt @@ -0,0 +1,27 @@ +-I/usr/include/webkitgtk-4.0 +-I/usr/include/glib-2.0 +-I/usr/lib/glib-2.0/include +-I/usr/include/sysprof-4 +-I/usr/include/gtk-3.0 +-I/usr/include/pango-1.0 +-I/usr/include/harfbuzz +-I/usr/include/freetype2 +-I/usr/include/libpng16 +-I/usr/include/libmount +-I/usr/include/blkid +-I/usr/include/fribidi +-I/usr/include/cairo +-I/usr/include/lzo +-I/usr/include/pixman-1 +-I/usr/include/gdk-pixbuf-2.0 +-I/usr/include/gio-unix-2.0 +-I/usr/include/cloudproviders +-I/usr/include/atk-1.0 +-I/usr/include/at-spi2-atk/2.0 +-I/usr/include/at-spi-2.0 +-I/usr/include/dbus-1.0 +-I/usr/lib/dbus-1.0/include +-I/usr/include/libsoup-2.4 +-I/usr/include/libxml2 +-pthread + diff --git a/user-scripts/artifacts/compile_flags/get-compile-flags.sh b/user-scripts/artifacts/compile_flags/get-compile-flags.sh new file mode 100644 index 0000000..aaa9e01 --- /dev/null +++ b/user-scripts/artifacts/compile_flags/get-compile-flags.sh @@ -0,0 +1,5 @@ +DEPS='webkit2gtk-4.0' +INCS=`pkg-config --cflags ${DEPS}` +LIBS=`pkg-config --libs ${DEPS}` +echo $INCS +echo $LIBS -- cgit v1.2.3