build: add convenience library which exports all symbols
Add a new libiscsipriv.la noinst convenience library, which can then be used by test-tool for low-level PDU manipulation. Link: https://github.com/sahlberg/libiscsi/issues/297 Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
@@ -1,19 +1,38 @@
|
||||
lib_LTLIBRARIES = libiscsi.la
|
||||
# test-tool needs to access private symbols, so build a noinst convenience
|
||||
# library.
|
||||
noinst_LTLIBRARIES = libiscsipriv.la
|
||||
|
||||
libiscsi_la_SOURCES = \
|
||||
libiscsipriv_la_SOURCES = \
|
||||
connect.c crc32c.c discovery.c init.c \
|
||||
login.c nop.c pdu.c iscsi-command.c \
|
||||
scsi-lowlevel.c socket.c sync.c task_mgmt.c \
|
||||
logging.c
|
||||
|
||||
if !HAVE_LIBGCRYPT
|
||||
libiscsi_la_SOURCES += md5.c
|
||||
libiscsipriv_la_SOURCES += md5.c
|
||||
endif
|
||||
|
||||
if HAVE_LINUX_ISER
|
||||
libiscsi_la_SOURCES += iser.c
|
||||
libiscsipriv_la_SOURCES += iser.c
|
||||
endif
|
||||
|
||||
if HAVE_LINUX_ISER
|
||||
libiscsipriv_la_LDFLAGS = -libverbs -lrdmacm
|
||||
endif
|
||||
|
||||
libiscsipriv_la_CPPFLAGS = -I${srcdir}/../include -I$(srcdir)/include \
|
||||
"-D_U_=__attribute__((unused))" \
|
||||
"-D_R_(A,B)=__attribute__((format(printf,A,B)))"
|
||||
|
||||
AM_CFLAGS=$(WARN_CFLAGS)
|
||||
|
||||
# The proper library just pulls in the convenience library and explicitly
|
||||
# specifies exported symbols.
|
||||
lib_LTLIBRARIES = libiscsi.la
|
||||
|
||||
libiscsi_la_SOURCES =
|
||||
libiscsi_la_LIBADD = libiscsipriv.la
|
||||
|
||||
SOCURRENT=9
|
||||
SOREVISON=0
|
||||
SOAGE=0
|
||||
@@ -21,15 +40,4 @@ libiscsi_la_LDFLAGS = \
|
||||
-version-info $(SOCURRENT):$(SOREVISON):$(SOAGE) -bindir $(bindir) \
|
||||
-no-undefined -export-symbols ${srcdir}/libiscsi.syms
|
||||
|
||||
if HAVE_LINUX_ISER
|
||||
libiscsi_la_LDFLAGS += -libverbs -lrdmacm
|
||||
endif
|
||||
|
||||
libiscsi_la_CPPFLAGS = -I${srcdir}/../include -I$(srcdir)/include \
|
||||
"-D_U_=__attribute__((unused))" \
|
||||
"-D_R_(A,B)=__attribute__((format(printf,A,B)))"
|
||||
|
||||
AM_CFLAGS=$(WARN_CFLAGS)
|
||||
|
||||
dist_noinst_DATA = libiscsi.syms libiscsi.def
|
||||
|
||||
|
||||
Reference in New Issue
Block a user