39 lines
654 B
Makefile
39 lines
654 B
Makefile
GRM=yacc.y
|
|
LEX=lex.l
|
|
BIN=out
|
|
|
|
CC=gcc
|
|
CFLAGS=-Wall -g
|
|
|
|
OBJ=yacc.tab.o lex.yy.o table.o operations.o blocs.o asmTable.o
|
|
|
|
asm: $(BIN)
|
|
@touch ../tests/testFile # to prevent an error in case of deletion
|
|
./out < ../tests/testFile
|
|
|
|
build: $(BIN)
|
|
|
|
%.o: %.c
|
|
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
yacc.tab.c: $(GRM)
|
|
bison -d -t -v $<
|
|
|
|
lex.yy.c: $(LEX)
|
|
flex $<
|
|
|
|
$(BIN): $(OBJ)
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $^ -o $@
|
|
|
|
clean:
|
|
rm $(OBJ) yacc.tab.c yacc.tab.h lex.yy.c
|
|
|
|
vhdl: clean asm
|
|
python3 ../cross-Compiler/cross-compiler.py
|
|
|
|
cli-inter: clean asm
|
|
python3 ../interpreter/interpreter.py
|
|
|
|
gui-inter: clean asm
|
|
python3 ../interpreter/graph_interpreter.py
|
|
|