summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-03-13 21:22:32 -0400
committerJakob Kaivo <jkk@ung.org>2019-03-13 21:22:32 -0400
commit949f13f09d2fe8df841ab05dff271f46f9a55bf9 (patch)
treec9bf65495bc14ddbf816038bdd99981d7bb8f670 /Makefile
migrate to gitlab
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2311579
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+.POSIX:
+
+.SUFFIXES: .cat .msg
+
+default: all
+
+CFLAGS=-g -Wall -Wextra -Wpedantic -Werror -Wno-unused-parameter
+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)