Mail Archives: djgpp/1996/07/18/03:11:15
On 16 Jul 1996, Bresie wrote:
> LIB_FLAGS = -L/C/djgpp/LIB -lxlib
> CFLAGS = $(LIB_FLAGS -O2)
^^^^^^^^^^^^^^^^
First, you should have said ``$(LIB_FLAGS) -O2''. But it's a bad idea to
put -lxlib into compilation switches, because -lxlib should go to the end
of the command line, so the library is scanned AFTER all the object
files. It's best to put -lxlib and such into a separate variable called
(by convention) $(LOADLIBES); then put it on the link commands only, you
don't need to add it to the compile-only rules that use gcc -c.
- Raw text -