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`
4 bindir = $(DESTDIR)$(PREFIX)/bin
5 libdir = $(DESTDIR)$(PREFIX)/lib
6 datadir = $(DESTDIR)$(PREFIX)/share
7 mandir = $(DESTDIR)/$(PREFIX)/man
9 .PHONY: chorizo clean uninstall install extensions update-darkreader
14 $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -o chorizo *.c
17 for i in *.c *.h; do clang-format $$i > tmp; mv tmp $$i; done
20 for i in extensions/*.c; do \
21 outp=$$(echo "$$i" | sed 's/\$\.c/.so/g'); \
22 $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $$outp -fPIC $$i $(LIBS); \
28 $(libdir)/chorizo/web-extensions \
29 $(datadir)/chorizo/user-scripts
33 cp chorizo.1 $(mandir)/man1/
34 makewhatis /usr/local/man
36 cp -r extensions/*.so $(libdir)/chorizo/web-extensions/
37 cp -r user-scripts/* $(datadir)/chorizo/user-scripts/
40 rm -rf $(bindir)/chorizo \
42 $(mandir)/man1/chorizo* \
45 reinstall: uninstall install
48 curl -L "https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js" \
49 -o user-scripts/darkreader.js
50 echo >> user-scripts/darkreader.js
51 echo 'DarkReader.enable({brightness:100,contrast:100,sepia:0});' \
52 >> user-scripts/darkreader.js
55 rm -fv chorizo extensions/*.so