[Omake] No library search path option

Aleksey Nogin nogin at metaprl.org
Sun Mar 25 13:08:49 PDT 2007


On 24.03.2007 18:05, Jonathan Roewen wrote:

> I don't seem to be able to specify -L options, like can be done for -I
> options in the same manner. I love the INCLUDES trick, and would like
> the same for -L options.

Yes, there is no explicit support for the library search path in C.om,
but it is easy to add manually, using something like:

LIBPATH[] =
PREFIXED_LIBPATH = $`(addprefix -L, $(LIBPATH))

LDFLAGS[] +=
   $(PREFIXED_LIBPATH)

The "$`" above is a delayed ("lazy") reference, which is what makes this
work right.

> Or am I missing some magic in omake such that it knows where to find
> libraries that are built as part of the project?

No magic. But if you want to statically link in an explicit set of
library files _and_ you would like those library files to be considered
explicit dependencies of the resulting binary, use the LIBS variable (a
set of library files _with_ full paths and _without_ extensions).

Aleksey


More information about the Omake mailing list