summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-06-10 23:45:25 -0700
committerKai Stevenson <kai@kaistevenson.com>2023-06-10 23:45:25 -0700
commit2a232f8f42c0a7d5a7b648358a192c21865a55f6 (patch)
tree81e5e768f75c5bd6da27235c723666f4cc4c2b1a /Makefile
lexing works
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0948a4e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+CFLAGS=-I. -Wall -Wextra -Wpedantic -O3 -lm -Wcast-align
+CFLAGS+= -Wshadow -Wstrict-prototypes -Wundef -Wpointer-arith
+CFLAGS+= -Wunreachable-code -Wswitch-enum -Wformat=2 -g
+PREFIX ?= /usr
+BINDIR ?= ${PREFIX}/bin
+
+generate:
+ $(CC) -o operetta operetta.c proposition.c parse.c lexer.c $(CFLAGS)
+
+install: operetta
+ install operetta ${DESTDIR}${BINDIR}
+clean:
+ rm precedent
+
+uninstall:
+ rm -f ${DESTDIR}${BINDIR}/operetta