1 CFLAGS += -std=c11 -Wno-unused-parameter -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); \
29 $(libdir)/chorizo/web-extensions \
30 $(datadir)/chorizo/user-scripts
34 cp chorizo.1 $(mandir)/man1/
35 cp chorizo-usage.7 $(mandir)/man7/
36 makewhatis /usr/local/man
38 cp -r extensions/*.so $(libdir)/chorizo/web-extensions/
39 cp -r user-scripts/* $(datadir)/chorizo/user-scripts/
42 rm -rf $(bindir)/chorizo \
44 $(mandir)/man1/chorizo* \
45 $(mandir)/man7/chorizo* \
48 reinstall: uninstall install
51 curl -L "https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js" \
52 -o user-scripts/darkreader.js
53 echo >> user-scripts/darkreader.js
54 echo 'DarkReader.enable({brightness:100,contrast:100,sepia:0});' \
55 >> user-scripts/darkreader.js
58 rm -fv chorizo extensions/*.so