tweak: add rudimentary makefile
This commit is contained in:
parent
3483af0f0f
commit
1fca042b0b
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1 @@
|
|||
rose
|
||||
# config.h
|
||||
.clang-format
|
||||
|
|
|
@ -24,6 +24,7 @@ You can see some screenshots in the [screenshots](./screenshots) folder.
|
|||
|
||||
### To do
|
||||
|
||||
- [ ] Look into using a makefile.
|
||||
- [ ] Look at using relative rather than absolute paths
|
||||
- [ ] Figure out if downloading files is doable.
|
||||
- [ ] Figure out better way to have plugins
|
||||
|
|
17
build.sh
17
build.sh
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
CC=clang
|
||||
SRC=rose.c
|
||||
# REQS=./plugins/stand_in/stand_in.c
|
||||
REQS=./plugins/*/*.c
|
||||
DEPS='webkit2gtk-4.0'
|
||||
DEBUG= #'-g'
|
||||
|
||||
INCS=`pkg-config --cflags ${DEPS}`
|
||||
LIBS=`pkg-config --libs ${DEPS}`
|
||||
|
||||
# Optional adblocking depends on https://github.com/jun7/wyebadblock
|
||||
WYEBAB='-L/usr/lib/wyebrowser/adblock.so'
|
||||
|
||||
# cp -f config.def.h config.h
|
||||
$CC $DEBUG $INCS $REQS $SRC -o rose $LIBS $WYEBAB
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
./build.sh && {
|
||||
cp -f rose /usr/bin
|
||||
mkdir -p /usr/share/themes/rose
|
||||
cp style.css /usr/share/themes/rose/
|
||||
cp rose-mklink /usr/bin
|
||||
}
|
45
makefile
Normal file
45
makefile
Normal file
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user