I have a simple makefile, which I'm including below:
YACC = bison
YFLAGS = -dv -o y.tab.c
LEX = flex
LFLAGS =
CFLAGS = -g
OBJS = main.o dict.o xref.o utility.o stack.o parser.o lexer.o
HEADERS = dict.h xref.h utility.h stack.h y.tab.h types.h
pdf: $(OBJS)
gcc -g -o pdf $(OBJS) -lfl
$(OBJS) : $(HEADERS)
.DEFAULT:
gcc -c $(CFLAGS) $< -o $@
clean:
rm $(OBJS); rm ./pdf
The problem is that if I remove the .DEFAULT rule, make complains that while compiling
the pdf target it can't find any
of the object files. The examples in the manual say that one can supply additional
prerequisites to implicit targets
without supplying a command and then the target will still remain implicit. But for
some reason it's not the case. Or
is it?
What's the reason and how can I do it without supplying the DEFAULT rule?
Thank you.
Sergei
--
^oo^
---oOo-(<>)-oOo---
got mutt?
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make