summary refs log tree commit diff
path: root/bin/edi/Makefile
blob: 2d9128c04278be452a86413d9e5162dded074c71 (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
CFLAGS += -Wall -Wextra -Wpedantic
LDLIBS = -lcursesw

OBJS += buffer.o
OBJS += log.o
OBJS += table.o

TESTS += buffer.t
TESTS += table.t

all: tags edi test

tags: *.h *.c
	ctags -w *.h *.c

edi: $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

$(OBJS): edi.h

test: $(TESTS)
	set -e; $(TESTS:%=./%;)

.SUFFIXES: .t

.c.t:
	$(CC) $(CFLAGS) -DTEST $(LDFLAGS) $< $(LDLIBS) -o $@

clean:
	rm -f tags edi $(OBJS) $(TESTS)