summaryrefslogtreecommitdiff
path: root/Makefile
blob: c75150884f5764d1f809194b0755fa390ae426f1 (plain)
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
CC ?= gcc
CFLAGS ?= -std=c11 -Wall -Wextra -O3 -Wno-sign-compare
LIBS := -lm

PREFIX ?= /usr/local

all: lolcat censor

debug: CFLAGS += -g
debug: all

.PHONY: install clean debug

xterm256lut.h: xterm256lut_gen.py
	python $< > $@

lolcat: lolcat.c xterm256lut.h
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)

censor: censor.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)

install: lolcat censor
	install lolcat $(DESTDIR)$(PREFIX)/bin/lolcat
	install censor $(DESTDIR)$(PREFIX)/bin/censor

clean:
	rm -f lolcat censor