As I mentioned in a previous thread, I'm writing a compiler for a subset of Pascal (Appendix A of the Dragon Book). I've been given the lex and yacc files to get me started as well as some other sample code including a makefile. This makefile is about 6 years old. When I run make, I get the following error:
Code:
cc -o pascal y.tab.o lex.yy.o symbol.o main.o -ll -ly
/usr/bin/ld: cannot find -ly
collect2: ld returned 1 exit status
make: *** [pascal] Error 1
Does anyone know what the -ly option is doing?
I'm going to be changing the makefile so that it uses gcc instead of cc. Is there an analogous option for gcc ?
I'll post the makefile for reference.
Thanks for any help.
Code:
pascal: y.tab.o lex.yy.o symbol.o main.o
cc -o pascal y.tab.o lex.yy.o symbol.o main.o -ll -ly
symbol.o: symbol.c globals.h
cc -c symbol.c
main.o: main.c symbol.h
cc -c main.c
y.tab.o: y.tab.c globals.h
cc -c y.tab.c
lex.yy.o: lex.yy.c symbol.h y.tab.h
cc -c lex.yy.c
y.tab.c: pascal.y symbol.h globals.h lex.yy.c
yacc -d pascal.y
lex.yy.c: pascal.l symbol.h
lex pascal.l