aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-13 00:58:50 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-13 00:58:50 -0400
commit0e5d55283a9adcc9b5ed071b4e18b74e55dbe0c4 (patch)
treefbac79b6bb2458ee17be3c537746492167544673 /Makefile
parent29cb0263d11cd90f991afbfe5d80dfa4212a69f5 (diff)
downloadrunes-0e5d55283a9adcc9b5ed071b4e18b74e55dbe0c4.tar.gz
runes-0e5d55283a9adcc9b5ed071b4e18b74e55dbe0c4.zip
convert the vt100 parser to flex
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 003027b..cae9f45 100644
--- a/Makefile
+++ b/Makefile
@@ -4,15 +4,23 @@ LIBS = cairo cairo-xlib libuv
CFLAGS ?= -g -Wall -Wextra -Werror
LDFLAGS ?= -g -Wall -Wextra -Werror
+GENERATED = vt100.c
+
build: $(OUT)
$(OUT): $(OBJ)
$(CC) $(shell pkg-config --libs $(LIBS)) $(LDFLAGS) -o $@ $^
+vt100.o: vt100.c
+ $(CC) $(shell pkg-config --cflags $(LIBS)) $(CFLAGS) -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wno-unused-value -c -o $@ $^
+
%.o: %.c
$(CC) $(shell pkg-config --cflags $(LIBS)) $(CFLAGS) -c -o $@ $^
+%.c: %.l
+ $(LEX) -o $@ $^
+
clean:
- rm -f $(OUT) $(OBJ)
+ rm -f $(OUT) $(OBJ) $(GENERATED)
.PHONY: build clean