# clectio -- tiny, fast, suckless daily readings # Configure by editing config.h (copied from config.def.h on first build). CC ?= cc CFLAGS = -std=c99 -Os -Wall -Wextra # -no-pie: this is a local CLI reading static embedded data with no attack # surface, so it does not need PIE/ASLR. Dropping it lets the linker bake the # string-table pointers in at link time instead of emitting ~57 KB of runtime # relocations -- a ~6% smaller binary for free. LDFLAGS = -s -no-pie PREFIX = /usr/local # The form to build is read from config.h so there is one source of truth. FORM := $(shell grep -Eq '^[[:space:]]*\#[[:space:]]*define[[:space:]]+FORM_EF' config.h 2>/dev/null && echo ef || echo of) # Bring your own Bible: `make CORPUS=/path/to/mybible.tsv` (same 6-column TSV # format as gen/, Vulgate-numbered). Empty = use the shipped Vulgate text. CORPUS ?= .PHONY: all clean size install uninstall all: clectio config.h: cp config.def.h config.h mktext: mktext.c $(CC) $(CFLAGS) -o $@ mktext.c bin2h: bin2h.c $(CC) $(CFLAGS) -o $@ bin2h.c # With CORPUS set, repack the text for the chosen form from that corpus; # otherwise the shipped text_