summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-03-13 21:26:44 -0400
committerJakob Kaivo <jkk@ung.org>2019-03-13 21:26:44 -0400
commit0c77d8d0e691c446a6bdcb9fa3dcfe4736587fa4 (patch)
tree8e5fb9cd709a29a6d0fb9f143d865c556d3596b6 /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..f8beb73
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+.POSIX:
+
+.SUFFIXES: .cat .msg
+
+default: all
+
+CFLAGS=-g -Wall -Wextra -Wpedantic -Werror
+UTILITY=file
+SOURCES=file.c magic.c
+HEADERS=file.h
+OBJECTS=file.o magic.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)