#adjust cflags for your cc CFLAGS= -O2 -Wall -Wpointer-arith -Werror -Wno-uninitialized -fomit-frame-pointer LDFLAGS= -s YFLAGS= -d -v LFLAGS= #adjust paths for your system [i hope you`ll not going to execute this on window$] CC= /usr/bin/cc YACC= /usr/bin/yacc LEX= /usr/bin/flex OBJ= parse.o lexer.o AUX= y.tab.h y.output ME= vp all: $(ME) build:all .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} .y.o: @echo "generating the parser . ." ${YACC} ${YFLAGS} $< ${CC} ${CFLAGS} -c y.tab.c @rm -f y.tab.c @mv y.tab.o $@ .l.o: @echo "generating the lexer . ." ${LEX} ${LFLAGS} $< ${CC} ${CFLAGS} -c lex.yy.c @rm -f lex.yy.c @mv lex.yy.o $@ $(ME): $(OBJ) @echo "making executable file . ." $(CC) $(CFLAGS) $(LDFLAGS) -o vp $(OBJ) clean: @echo "cleaning . ." rm -f $(OBJ) $(ME) $(AUX) #vi:set ts=8 sts=4 sw=4 tw=79: