adji

Adji's a Decisive and Joyful Internet browser
git clone https://noxz.tech/git/adji.git
adji

Makefile
1.POSIX:
2
3include config.mk
4
5all: options ${__NAME__} we_redirect.so
6
7options:
8	@echo build options:
9	@echo "CFLAGS  = ${CFLAGS}"
10	@echo "CC      = ${CC}"
11
12${__NAME__}: browser.c config.h
13	${CC} ${CFLAGS} ${LDFLAGS} \
14		-o $@ $< \
15		`pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0`
16
17we_redirect.so: we_redirect.c
18	${CC} ${CFLAGS} ${LDFLAGS} \
19		-shared -o $@ -fPIC $< \
20		`pkg-config --cflags --libs glib-2.0 webkit2gtk-4.0`
21
22install: all
23	mkdir -v -p ${DESTDIR}${PREFIX}/bin
24	cp -v ${__NAME__} ${DESTDIR}${PREFIX}/bin
25	chmod 755 ${DESTDIR}${PREFIX}/bin/${__NAME__}
26	mkdir -v -p ${DESTDIR}${PREFIX}/man1
27	sed "s/VERSION/${VERSION}/g" < ${__NAME__}.1 > ${DESTDIR}${MANPREFIX}/man1/${__NAME__}.1
28	chmod 644 ${DESTDIR}${MANPREFIX}/man1/${__NAME__}.1
29	mkdir -v -p ${DESTDIR}${PREFIX}/lib/${__NAME__}/web_extensions
30	cp -v we_redirect.so ${DESTDIR}${PREFIX}/lib/${__NAME__}/web_extensions
31	@echo
32	@echo "== NOTE ========================================="
33	@printf " to enable we_redirect.so it must be copied from\n\
34	 ${DESTDIR}${PREFIX}/lib/${__NAME__}/web_extensions\n to\n\
35	 ~/.config/${__NAME__}/web_extensions\n"
36
37uninstall:
38	rm -rf ${DESTDIR}${PREFIX}/bin/${__NAME__}
39	rm -rf ${DESTDIR}${MANPREFIX}/man1/${__NAME__}.1
40	rm -rf ${DESTDIR}${PREFIX}/lib/${__NAME__}
41
42clean:
43	rm -f ${__NAME__} we_redirect.so
44
45.PHONY: all clean install uninstall