[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Library linking
From: |
Brendan Heading |
Subject: |
Re: Library linking |
Date: |
Sun, 2 Oct 2011 19:07:24 +0100 |
> LDFLAGS = -Wl,static
> LDLIBS = libhello.a
> ...
>
> hello : libhello.a
> gcc -o $@ $^ $(LDFLAGS) $(LDLIBS)
Jeff,
That will result in "gcc -o $@ libhello.a -Wl,static libhello.a.
I think it's untidy; it basically mentions libhello.a twice. I was
hoping to avoid this using the library search feature, see :
http://www.gnu.org/software/make/manual/html_node/Libraries_002fSearch.html#Libraries_002fSearch
Brendan