summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-04-19 14:23:05 -0700
committerBen Smith <binji@chromium.org>2016-04-21 14:17:46 -0700
commit2f3625e382c0b1e2e826d4c2c509ab43a4f4e59b (patch)
tree5aec2ae7b2276a6267c6aa2a29df6fed0839091b /Makefile
parentef794aaa57705ff4b7015a4f2b78ca8ea4ff5af6 (diff)
downloadwabt-2f3625e382c0b1e2e826d4c2c509ab43a4f4e59b.tar.gz
wabt-2f3625e382c0b1e2e826d4c2c509ab43a4f4e59b.tar.bz2
wabt-2f3625e382c0b1e2e826d4c2c509ab43a4f4e59b.zip
lex using re2c instead of flex
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 0c0aa617..cdc95afe 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ DEFAULT_BUILD_TYPE = DEBUG
COMPILERS := GCC GCC_I686 GCC_FUZZ CLANG EMSCRIPTEN
BUILD_TYPES := DEBUG RELEASE
SANITIZERS := ASAN MSAN LSAN
-CONFIGS := NORMAL ASAN MSAN LSAN NO_FLEX_BISON NO_TESTS
+CONFIGS := NORMAL ASAN MSAN LSAN NO_RE2C_BISON NO_TESTS
EXECUTABLES := sexpr-wasm wasm-wast wasm-interp wasm-interp-sq hexfloat_test
# directory names
@@ -46,7 +46,7 @@ NORMAL_DIR :=
ASAN_DIR := asan/
MSAN_DIR := msan/
LSAN_DIR := lsan/
-NO_FLEX_BISON_DIR := no-flex-bison/
+NO_RE2C_BISON_DIR := no-re2c-bison/
NO_TESTS_DIR := no-tests/
# CMake flags
@@ -62,7 +62,7 @@ NORMAL_FLAG :=
ASAN_FLAG := -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address
MSAN_FLAG := -DCMAKE_C_FLAGS=-fsanitize=memory -DCMAKE_CXX_FLAGS=-fsanitize=memory
LSAN_FLAG := -DCMAKE_C_FLAGS=-fsanitize=leak -DCMAKE_CXX_FLAGS=-fsanitize=leak
-NO_FLEX_BISON_FLAG := -DRUN_FLEX_BISON=OFF
+NO_RE2C_BISON_FLAG := -DRUN_BISON=OFF -DRUN_RE2C=OFF
NO_TESTS_FLAG := -DBUILD_TESTS=OFF
# make target prefixes
@@ -77,7 +77,7 @@ NORMAL_PREFIX :=
ASAN_PREFIX := -asan
MSAN_PREFIX := -msan
LSAN_PREFIX := -lsan
-NO_FLEX_BISON_PREFIX := -no-flex-bison
+NO_RE2C_BISON_PREFIX := -no-re2c-bison
NO_TESTS_PREFIX := -no-tests
ifeq ($(USE_NINJA),1)
@@ -134,15 +134,15 @@ clean:
.PHONY: test-everything
test-everything:
-.PHONY: update-bison update-flex
+.PHONY: update-bison update-re2c
update-bison: src/prebuilt/wasm-bison-parser.c
-update-flex: src/prebuilt/wasm-flex-lexer.c
+update-re2c: src/prebuilt/wasm-re2c-lexer.c
src/prebuilt/wasm-bison-parser.c: src/wasm-bison-parser.y
bison -o $@ $< --defines=src/prebuilt/wasm-bison-parser.h
-src/prebuilt/wasm-flex-lexer.c: src/wasm-flex-lexer.l
- flex -o $@ $<
+src/prebuilt/wasm-re2c-lexer.c: src/wasm-lexer.c
+ re2c -bc -o $@ $<
# defaults with simple names
$(foreach EXECUTABLE,$(EXECUTABLES), \