aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 89aac20d4e5b2f2f5b8c2540fd86617c6d43468e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# colitur-x -- an X11 front-end 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   ## build it

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)


install: all   ## install into $(BINDIR)
	@mkdir -p $(BINDIR)
	install -m 755 colitur-x $(BINDIR)
	@echo "installed colitur-x into $(BINDIR)"

uninstall:   ## remove it again
	rm -f $(BINDIR)/colitur-x

clean:   ## remove the binary
	rm -f colitur-x