Mail Archives: djgpp/1997/02/24/10:34:36
At 12:05 23/02/97 +0200, Eli Zaretskii wrote:
>
[snipped]
>
>Hey, that's GNU Make we are using, remember? It doesn't need to be
>told all these trivia, it already knows about them. All you need is
>to tell it something it *doesn't* know. Observe:
>
> # Variables:
> LINK.cc = gxx $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
> CXXFLAGS = -Wall -O2
> LDLIBS = -lalleg
>
> # Main target:
> all: foo
^^^^ <- This way we generate a foo _and_ foo.exe! OTOH, GNU
make doesn't make foo.exe if one puts in the all line just foo.exe!
>
> #Dependencies (it already knows about foo.cc):
> foo.o: foo1.h foo2.h
>
>That's all! The above is enough to produce exactly the same effect as
>the Makefile suggested by George. (Warning: I didn't have time to test
>the above Makefile, so it might include errors.)
>
>If the above is knew to you, type "make -p | less" and you will see
>the huge data-base of all the built-in rules that GNU Make knows
>about.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak E-mail: csrabak AT ipt DOT br
DME/ASC Phone: 55-11-268-3522 Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax: 55-11-268-5996
Av. Prof. Almeida Prado, 532. Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Raw text -