Mail Archives: djgpp/1999/11/26/09:48:09
In article <199911250131 DOT UAA07684 AT delorie DOT com> you wrote:
> CC = gxx
> CFLAGS = -g -O2
> OBJECTS = main.o
> main.exe : $(OBJECTS)
> $(CC) $(FLAGS) $(OBJECTS) -o main.exe
^^^^^^^^
suspected typo, there. Should be $(CFLAGS).
> %.o : %.c
> $(CC) $(FLAGS) -c $<
^^^^^^^^^^
Same, here.
> it says no rule blah blah blah -
Please make a habit of *not* short-cutting error messages you cite to
us. In that 'blah blah blah', you've thrown away potentially vital
information about your problem.
Off-hand, I think your problem is that you don't have any rule that
states 'main.o' as coming out of 'main.c'. The implicit pattern rule
(%.o : %.c) alone doesn't do that. You need a line
main.o: main.c
in addition to it. Only for old-style implicit rules (.c.o) and the
'.SUFFIXES' list that goes with it, you can omit the explicit
dependencies completely.
> i have taken this example right out of the manual
Sure? Including the typos?
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -