I want to make a make file for my lexical analyzer using flex ,I have tried to many templates of make files but it did not work so please help me build one here is the lines to compile the code:
lex -t lexical.l > lexical.c
cc -c -o lexical.o lexical.c
cc -o lexy lexical.o -ll
A starting point would be
This needs to be extended with
cleanrules, dependency tracking and so on, but I think you should be able to get the idea how Makefiles work.