1 CFLAGS += -Wno-unused-parameter -Wunknown-warning-option -D_XOPEN_SOURCE="700"
2 LIBS = `pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0`
3 EXTENSIONS = extensions/we_adblock
5 bindir = $(DESTDIR)$(PREFIX)/bin
6 libdir = $(DESTDIR)$(PREFIX)/lib
7 datadir = $(DESTDIR)$(PREFIX)/share
8 mandir = $(DESTDIR)/$(PREFIX)/man
10 .PHONY: chorizo clean uninstall install extensions update-darkreader
15 $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -o chorizo *.c
18 for i in *.c *.h; do clang-format $$i > tmp; mv tmp $$i; done
23 makeheaders -h *.[ch] > tmp2
28 $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@.so -fPIC $@.c $(LIBS);
30 extensions: $(EXTENSIONS)
35 $(libdir)/chorizo/web-extensions \
36 $(datadir)/chorizo/user-scripts
40 cp chorizo.1 $(mandir)/man1/
41 makewhatis /usr/local/man
43 cp -r extensions/*.so $(libdir)/chorizo/web-extensions/
44 cp -r user-scripts/* $(datadir)/chorizo/user-scripts/
47 rm -rf $(bindir)/chorizo \
49 $(mandir)/man1/chorizo* \
52 reinstall: uninstall install
55 curl -L "https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js" \
56 -o user-scripts/darkreader.js
57 echo >> user-scripts/darkreader.js
58 echo 'DarkReader.enable({brightness:100,contrast:100,sepia:0});' \
59 >> user-scripts/darkreader.js
62 rm -fv chorizo extensions/*.so