#CFLAGS = -std=c17 -Wall -Wextra -Wpedantic -DNDEBUG -O2
CFLAGS = -std=c17 -Wall -Wextra -Wpedantic -O0 -g
##OBJ##
OBJ = main.o abort.o execute.o expression.o functions.o getitem.o \
    identifiers.o idtable.o nextch.o statements.o strliteral.o symset.o

dusk: $(OBJ)
	$(CC) -o $@ $(OBJ)

clean:
	rm -rf *.o dusk graph.pdf *.dSYM

##DEPENDENCY##
abort.o: abort.c identifiers.h getitem.h nextch.h token.h common_def.h \
  strliteral.h abort.h
execute.o: execute.c execute.h stnode.h common_def.h expnode.h exp_imp.h \
  token.h stnode_imp.h statements.h getitem.h nextch.h symset.h \
  strliteral.h abort.h
expression.o: expression.c statements.h stnode.h common_def.h getitem.h \
  nextch.h token.h symset.h expression.h expnode.h exp_imp.h \
  stnode_imp.h abort.h
functions.o: functions.c identifiers.h getitem.h nextch.h token.h \
  common_def.h statements.h stnode.h symset.h stnode_imp.h expnode.h \
  abort.h
getitem.o: getitem.c strliteral.h identifiers.h getitem.h nextch.h \
  token.h common_def.h abort.h
identifiers.o: identifiers.c identifiers.h getitem.h nextch.h token.h \
  common_def.h idtable.h
idtable.o: idtable.c identifiers.h getitem.h nextch.h token.h \
  common_def.h idtable.h abort.h
main.o: main.c identifiers.h getitem.h nextch.h token.h common_def.h \
  statements.h stnode.h symset.h execute.h expnode.h abort.h
nextch.o: nextch.c nextch.h abort.h
statements.o: statements.c identifiers.h getitem.h nextch.h token.h \
  common_def.h statements.h stnode.h symset.h stnode_imp.h expnode.h \
  expression.h abort.h
strliteral.o: strliteral.c
symset.o: symset.c symset.h token.h common_def.h
