[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Documentation of LDLIBS and LOADLIBES
From: |
Paul D. Smith |
Subject: |
Re: Documentation of LDLIBS and LOADLIBES |
Date: |
Mon, 30 Sep 2002 09:29:19 -0400 |
%% Jorma Laaksonen <address@hidden> writes:
jl> Could someone please explain me the roles of the variables LDLIBS
jl> and LOADLIBES ? It seems to me that by default they are always
jl> concatenated when used. Also, the system-specific makes I have
jl> access to only use LOADLIBES and not LDLIBS. A short explanation
jl> of the roles of these two would be appreciated also in the texinfo
jl> documentation!
They're just two common variables used by different make systems to
contain linker libraries. They're both included in every link command,
mostly as a nod to portability, in the built in rule set that make uses,
so you'd see:
%: %.o
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
etc. (LINK.o contains "$(CC) $(LDFLAGS) $(TARGET_ARCH)").
They have no default value, and no intrinsic use: use the one you like,
or use both and choose your own definition of what they should be.
You can use:
$ make -pf/dev/null
to see the default rule set.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist