2010-08-26 18:50:56 +00:00
|
|
|
include $(top_srcdir)/config/Rules.am
|
|
|
|
|
2020-01-17 20:40:09 +00:00
|
|
|
if TARGET_CPU_I386
|
2020-06-19 19:24:20 +00:00
|
|
|
TARGET_CPU_ATOMIC_SOURCE = asm-i386/atomic.S
|
2020-01-17 20:40:09 +00:00
|
|
|
else
|
|
|
|
if TARGET_CPU_X86_64
|
2020-06-19 19:24:20 +00:00
|
|
|
TARGET_CPU_ATOMIC_SOURCE = asm-x86_64/atomic.S
|
2020-01-17 20:40:09 +00:00
|
|
|
else
|
2020-06-19 19:24:20 +00:00
|
|
|
TARGET_CPU_ATOMIC_SOURCE = asm-generic/atomic.c
|
2020-01-17 20:40:09 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-06-19 19:24:20 +00:00
|
|
|
SUBDIRS = include
|
2010-08-26 18:50:56 +00:00
|
|
|
|
|
|
|
AM_CCASFLAGS = \
|
2017-10-11 05:36:26 +00:00
|
|
|
$(CFLAGS)
|
2010-08-26 18:50:56 +00:00
|
|
|
|
2020-07-04 22:24:13 +00:00
|
|
|
noinst_LTLIBRARIES = libspl_assert.la libspl.la
|
|
|
|
|
|
|
|
libspl_assert_la_SOURCES = \
|
|
|
|
assert.c
|
2010-08-26 18:50:56 +00:00
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
USER_C = \
|
|
|
|
list.c \
|
|
|
|
mkdirp.c \
|
2016-10-26 04:32:23 +00:00
|
|
|
page.c \
|
2018-12-12 00:01:41 +00:00
|
|
|
strlcat.c \
|
|
|
|
strlcpy.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
timestamp.c \
|
|
|
|
include/sys/list.h \
|
|
|
|
include/sys/list_impl.h
|
|
|
|
|
2019-10-02 17:39:48 +00:00
|
|
|
if BUILD_LINUX
|
|
|
|
USER_C += \
|
|
|
|
os/linux/getexecname.c \
|
|
|
|
os/linux/gethostid.c \
|
2020-08-30 17:37:44 +00:00
|
|
|
os/linux/getmntany.c \
|
|
|
|
os/linux/zone.c
|
2019-10-02 17:39:48 +00:00
|
|
|
endif
|
|
|
|
|
2020-04-14 18:36:28 +00:00
|
|
|
if BUILD_FREEBSD
|
|
|
|
USER_C += \
|
|
|
|
os/freebsd/getexecname.c \
|
|
|
|
os/freebsd/gethostid.c \
|
|
|
|
os/freebsd/getmntany.c \
|
2020-08-30 17:37:44 +00:00
|
|
|
os/freebsd/mnttab.c \
|
|
|
|
os/freebsd/zone.c
|
2020-04-14 18:36:28 +00:00
|
|
|
endif
|
|
|
|
|
2020-06-25 18:14:54 +00:00
|
|
|
libspl_la_SOURCES = \
|
2014-06-09 21:55:31 +00:00
|
|
|
$(USER_C) \
|
2020-06-19 19:24:20 +00:00
|
|
|
$(TARGET_CPU_ATOMIC_SOURCE)
|
2011-07-05 19:12:08 +00:00
|
|
|
|
2020-07-04 22:24:13 +00:00
|
|
|
libspl_la_LIBADD = \
|
|
|
|
libspl_assert.la
|
|
|
|
|
Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.
Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
libssl
- librt is only used for clock_gettime, however on modern systems that's
in libc rather than librt. Add a configure check to see if we actually
need librt
- libdl from raidz_test
Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
libspl_assertf
Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.
Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.
List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-06-30 17:10:41 +00:00
|
|
|
libspl_la_LIBADD += $(LIBCLOCK_GETTIME)
|