# colitur-x / colitur-mu -- X11 front-ends for colitur. # Configuration is compile-time: edit config.h and rebuild. PREFIX ?= $(HOME)/.local BINDIR = $(PREFIX)/bin CFLAGS ?= -std=c99 -Os -Wall -Wextra X11FLAGS = $(shell pkg-config --cflags xft x11) LDLIBS = $(shell pkg-config --libs xft x11) .PHONY: all help clean install uninstall all: colitur-x colitur-mu ## build both front-ends help: ## list targets @grep -hE '^[a-z-]+:.*##' $(MAKEFILE_LIST) \ | sed -e 's/:.*##/\t/' -e 's/^/ /' | expand -t 16 colitur-x: colitur-x.c config.h ## the read-only month grid (raw Xlib) $(CC) $(CFLAGS) $(X11FLAGS) -o $@ colitur-x.c $(LDLIBS) colitur-mu: colitur-mu.c mu_x11.c mu_x11.h vendor/microui.c vendor/microui.h config.h ## the editable list (microui) $(CC) $(CFLAGS) $(X11FLAGS) -o $@ colitur-mu.c mu_x11.c vendor/microui.c $(LDLIBS) install: all ## install both into $(BINDIR) @mkdir -p $(BINDIR) install -m 755 colitur-x colitur-mu $(BINDIR) @echo "installed colitur-x and colitur-mu into $(BINDIR)" uninstall: ## remove them again rm -f $(BINDIR)/colitur-x $(BINDIR)/colitur-mu clean: ## remove both binaries rm -f colitur-x colitur-mu