help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question


From: Sergei Gerasenko
Subject: question
Date: Thu, 29 May 2003 02:49:40 -0400
User-agent: Mutt/1.3.28i

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?               




reply via email to

[Prev in Thread] Current Thread [Next in Thread]