[Omake] Re: CProgram sets no dependcies on LIBS - is it a bug?
Yegor Bryukhov
ybryukhov at gmail.com
Fri Sep 8 07:05:17 PDT 2006
The C example in OMake documentation seems to take a different approach - it
uses LIBS to list "in-project" libraries as files, without '-l' flag and
with $(file ...) functionality in OMake you do not need -L at all.
All third-party libraries can be included via LDFLAGS, right?
And it seems that the C example from the documentation does not really tell
OMake to compile the "in-project" library, is it correct?
On 9/8/06, David Kågedal <davidk at lysator.liu.se> wrote:
>
> "Yegor Bryukhov" <ybryukhov at gmail.com> writes:
>
> > I noticed that OCamlProgram explicitly says that BYTEPROG depends on
> LIBS
> > but CProgram states only dependencies on OFILES.
> > Looks like a bug to me, is it?
> > (my project actually confirms it - omake does not want to compile
> libraries
> > needed for the target executable)
>
> That depends on how you use LIBS when compiling C. The current C.om
> and documentation seems to assume that you only ever use static
> libraries, and that you link them by including the library file names
> on the linker command line.
>
> The normal way to link libraries (on UNIX) is to use the -l flag. And
> if you set LIBS=-lfoo -lbar, you obviously don't want to depend on
> $(LIBS) directly. Some of these libraries are often system libraries
> anyway, and there's no point in depending on those if omake doesn't
> track them. And for the libraries that are part of the project, you
> have to search for them by looking at -L flags and $(getenv
> LD_LIBRARY_PATH).
>
> There is also a variable LDFLAGS in C.om, but that is included on the
> linker command line *after* LIBS, so obviously that isn't meant to be
> used as the place to put -L flags. So LIBS will have to contain those
> too.
>
> I think there is room for improvement in C.om.
>
> --
> David Kågedal
>
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
>
--
Best regards,
Yegor
__________________________________________________________
Yegor Bryukhov,
Research Associate
Center for Algorithms and Interactive Scientific Software
City College of New York
office: Shepard 278
office phone: +1(212)650-5378
cell phone: +1(917)650-2035
e-mail: ybryukhov at gmail.com
home-page: http://yegor.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.metaprl.org/pipermail/omake/attachments/20060908/4e369bdd/attachment.html
More information about the Omake
mailing list