readr

Minimal Terminal RSS Reader
Log | Files | Refs | README | LICENSE

makefile (850B)



APP := readr
PKG := $(shell pkg-config --cflags --libs mrss sqlite3 libcurl)
CFLAGS := -std=c23 -g -Wall -Wextra -fsanitize=address -fsanitize=undefined
CREL := -std=c23 -Wall -Wextra -Wpedantic -Werror -O3

default:
	cc **/*.c ${CFLAGS} ${PKG} -o ${APP}

clean:
	$(RM) readr

release: clean
	cc **/*.c ${CREL} ${PKG} -o ${APP}

install: release
	mkdir -p /usr/local/bin
	install -m755 readr /usr/local/bin/.
	mkdir -p /usr/local/share/man/man1
	install -m644 docs/readr.1 /usr/local/share/man/man1/.

manpage:
	scdoc < docs/readr.scd > docs/readr.1

html: manpage
	mandoc -T html docs/readr.1 > docs/readr.html.tmp
	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
	$(RM) docs/readr.html.tmp