makefile (850B)
1 APP := readr 2 PKG := $(shell pkg-config --cflags --libs mrss sqlite3 libcurl) 3 CFLAGS := -std=c23 -g -Wall -Wextra -fsanitize=address -fsanitize=undefined 4 CREL := -std=c23 -Wall -Wextra -Wpedantic -Werror -O3 5 6 default: 7 cc **/*.c ${CFLAGS} ${PKG} -o ${APP} 8 9 clean: 10 $(RM) readr 11 12 release: clean 13 cc **/*.c ${CREL} ${PKG} -o ${APP} 14 15 install: release 16 mkdir -p /usr/local/bin 17 install -m755 readr /usr/local/bin/. 18 mkdir -p /usr/local/share/man/man1 19 install -m644 docs/readr.1 /usr/local/share/man/man1/. 20 21 manpage: 22 scdoc < docs/readr.scd > docs/readr.1 23 24 html: manpage 25 mandoc -T html docs/readr.1 > docs/readr.html.tmp 26 awk '{gsub(/<\/head>/,"<style>html{background: #333; color: #eee; max-width: 50rem; margin: 1rem auto; font-family: sans-serif;} a{color: white;}<\/style><\/head>")}1' docs/readr.html.tmp > docs/readr.html 27 $(RM) docs/readr.html.tmp