rosenrot/makefile

59 lines
1.3 KiB
Makefile
Raw Normal View History

2023-03-28 17:11:18 +00:00
# make
# make build
# (sudo) make install
# make format
# make clean
# make uninstall
2023-03-28 16:59:38 +00:00
## 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}`
2023-03-28 17:11:18 +00:00
## Optional adblocking
## depends on https://github.com/jun7/wyebadblock
ADBLOCK='-L/usr/lib/wyebrowser/adblock.so'
## Plugins
2023-03-28 16:59:38 +00:00
LIBRE_REDIRECT=./plugins/libre_redirect/libre_redirect.c ./plugins/libre_redirect/str_replace_start.c
READABILITY=./plugins/readability/readability.c
2023-03-28 17:11:18 +00:00
CUSTOM_STYLES=./plugins/style/style.c
2023-03-28 16:59:38 +00:00
STAND_IN=./plugins/stand_in/stand_in.c # gives function definitions for the above, which do nothing
2023-03-28 17:11:18 +00:00
PLUGS=$(LIBRE_REDIRECT) $(READABILITY) $(CUSTOM_STYLES)
2023-03-28 16:59:38 +00:00
# PLUGS=$(STAND_IN)
# Note that if you want some plugins but not others,
# You should edit the stand_in.c file
# CONFIG
CONFIG=config.h
# cp -f config.def.h config.h
2023-03-28 17:11:18 +00:00
## Formatter
STYLE_BLUEPRINT=webkit
FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
## Commands
2023-03-28 16:59:38 +00:00
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
2023-03-28 17:11:18 +00:00
format: $(SRC) $(PLUGS)
$(FORMATTER) $(SRC) $(PLUGS)