summaryrefslogtreecommitdiff
path: root/Makefile
blob: 6e68f88cd30436246b7af7c7f57efcea34e0d87e (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
.POSIX:

.SUFFIXES: .cat .msg

default: all

CFLAGS=-g -Wall -Wextra -Wpedantic -Werror
UTILITY=ed
SOURCES=ed.c commands.c stubs.c env.c io.c signals.c input.c re.c
HEADERS=ed.h
OBJECTS=ed.o commands.o stubs.o env.o io.o signals.o input.o re.o
L10N=
all: $(UTILITY) $(L10N)

$(UTILITY): $(OBJECTS) $(HEADERS)

.msg.cat:
	gencat $@ $<

.c.cat:
	sed -ne '/^\/\*\*cat/,/cat\*\*\//p;' $< | grep -v ^/ | grep -v ^\* | gencat $@ -

clean:
	rm -f *.o $(L10N) $(UTILITY)