aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 2b83c52ca114642f6e8ebdfe395fd0b17f3b6739 (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
OUT      = runes
OBJ      = runes.o display.o term.o parser.o window-xlib.o pty-unix.o
LIBS     = cairo cairo-xlib libuv
CFLAGS  ?= -g -Wall -Wextra -Werror
LDFLAGS ?= -g -Wall -Wextra -Werror

GENERATED = parser.c

build: $(OUT)

$(OUT): $(OBJ)
	$(CC) $(shell pkg-config --libs $(LIBS)) $(LDFLAGS) -o $@ $^

%.o: %.c
	$(CC) $(shell pkg-config --cflags $(LIBS)) $(CFLAGS) -c -o $@ $^

%.c: %.l
	$(LEX) -o $@ $^

clean:
	rm -f $(OUT) $(OBJ) $(GENERATED)

.PHONY: build clean