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

OBJS += buffer.o
OBJS += edi.o
OBJS += file.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)