Add generating the table to the main build script
This commit is contained in:
parent
6c454fbb8e
commit
7eec0e0730
27
compile
27
compile
@ -1,24 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR="$(dirname $0)"
|
||||
CC=clang
|
||||
CFLAGS="-g -Wall -Werror -pedantic -Iinclude"
|
||||
SRC="src/main.c"
|
||||
OUT=main
|
||||
CFLAGS="-g -Wall -Werror -pedantic -I$SCRIPT_DIR/include"
|
||||
SRC="$SCRIPT_DIR/src/main.c"
|
||||
OUT=$SCRIPT_DIR/main
|
||||
|
||||
# STATE_TABLE
|
||||
$CC $CFLAGS -I$SCRIPT_DIR/include/lexer $SCRIPT_DIR/generate_state_table.c -o $SCRIPT_DIR/gentable
|
||||
$SCRIPT_DIR/gentable
|
||||
|
||||
# DSTRING
|
||||
CFLAGS+=" -Iinclude/dstring"
|
||||
SRC+=" src/dstring/*.c"
|
||||
CFLAGS+=" -I$SCRIPT_DIR/include/dstring"
|
||||
SRC+=" $SCRIPT_DIR/src/dstring/*.c"
|
||||
|
||||
# JSON_ENTITIES
|
||||
CFLAGS+=" -Iinclude/json_entities"
|
||||
SRC+=" src/json_entities/*.c"
|
||||
CFLAGS+=" -I$SCRIPT_DIR/include/json_entities"
|
||||
SRC+=" $SCRIPT_DIR/src/json_entities/*.c"
|
||||
|
||||
# LEXER
|
||||
CFLAGS+=" -Iinclude/lexer"
|
||||
SRC+=" src/lexer/*.c"
|
||||
CFLAGS+=" -I$SCRIPT_DIR/include/lexer"
|
||||
SRC+=" $SCRIPT_DIR/src/lexer/*.c"
|
||||
|
||||
# PARSER
|
||||
CFLAGS+=" -Iinclude/parser"
|
||||
SRC+=" src/parser/*.c"
|
||||
CFLAGS+=" -I$SCRIPT_DIR/include/parser"
|
||||
SRC+=" $SCRIPT_DIR/src/parser/*.c"
|
||||
|
||||
$CC $CFLAGS $SRC -o $OUT
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
clang -Iinclude -Iinclude/lexer generate_state_table.c -o gentable
|
Loading…
Reference in New Issue
Block a user