diff --git a/parser/Makefile b/parser/Makefile new file mode 100644 --- /dev/null +++ b/parser/Makefile @@ -0,0 +1,36 @@ +CC=gcc +LD=ld +YACC=bison -y +FLEX=flex +CFLAGS=-Wall -O2 -ansi +LDFLAGS= +INCLUDE=include +OBJECTS=main.o parser.o lexer.o +TARGET=parser + +.SUFFIXES: .c .yy .ll + +.c.o: + $(CC) -c $(CFLAGS) -I$(INCLUDE) $(CONFIG) $< + +.yy.c: + $(YACC) -d $< -o $@ + +.ll.c: + $(FLEX) -o $@ $< + +all: $(TARGET) + + +$(TARGET): $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@ + +.PHONY: distclean clean + +clean: + rm -f *.[oae]; + rm -f *~; + +distclean: + make clean + rm -f $(TARGET)