[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
using .la or .a when linking an executable ?
From: |
Vincent Torri |
Subject: |
using .la or .a when linking an executable ? |
Date: |
Sun, 28 Sep 2008 13:04:44 +0200 (CEST) |
Hey,
we have a library called libeet and an binary called eet.
libeet depends on libjpeg and zlib., so in the file libeet.la, the field
dependency_libs is set to "-lz /usr/lib/libjpeg.la"
Now, to create the binary eet, in my Makefile.am, i have:
eet_LDADD = $(top_builddir)/src/lib/libeet.la
Hence when I call objdump -p on my eet binary, i get:
NEEDED libeet.so.1
NEEDED libz.so.1
NEEDED libjpeg.so.62
But a friend told me that the eet binary should not have libz and libjpeg, only
libeet.
So I have two questions:
1) Is my friend right ?
2) If he is right, what should I do to remove those "dependencies" ? (flag to
pass in a variable in my Makefile.am, or something like that)
I paste the Makefile.am that is used to compile the eet binary below
thank you
Vincent Torri
### beginning of Makefile.am
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\"
bin_PROGRAMS = eet
eet_SOURCES = eet_main.c
eet_CFLAGS = @WIN32_CFLAGS@
eet_LDADD = $(top_builddir)/src/lib/libeet.la
eet_LDFLAGS = @lt_enable_auto_import@
eet_DEPENDENCIES = $(top_builddir)/src/lib/libeet.la
- using .la or .a when linking an executable ?,
Vincent Torri <=