2010-08-26 22:50:56 +04:00
|
|
|
include $(top_srcdir)/config/Rules.am
|
|
|
|
|
2020-01-17 23:40:09 +03:00
|
|
|
if TARGET_CPU_I386
|
2020-06-19 22:24:20 +03:00
|
|
|
TARGET_CPU_ATOMIC_SOURCE = asm-i386/atomic.S
|
2020-01-17 23:40:09 +03:00
|
|
|
else
|
|
|
|
if TARGET_CPU_X86_64
|
2020-06-19 22:24:20 +03:00
|
|
|
TARGET_CPU_ATOMIC_SOURCE = asm-x86_64/atomic.S
|
2020-01-17 23:40:09 +03:00
|
|
|
else
|
2020-06-19 22:24:20 +03:00
|
|
|
TARGET_CPU_ATOMIC_SOURCE = asm-generic/atomic.c
|
2020-01-17 23:40:09 +03:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-06-19 22:24:20 +03:00
|
|
|
SUBDIRS = include
|
2010-08-26 22:50:56 +04:00
|
|
|
|
|
|
|
AM_CCASFLAGS = \
|
2017-10-11 08:36:26 +03:00
|
|
|
$(CFLAGS)
|
2010-08-26 22:50:56 +04:00
|
|
|
|
2020-07-05 01:24:13 +03:00
|
|
|
noinst_LTLIBRARIES = libspl_assert.la libspl.la
|
|
|
|
|
|
|
|
libspl_assert_la_SOURCES = \
|
|
|
|
assert.c
|
2010-08-26 22:50:56 +04:00
|
|
|
|
2014-06-10 01:55:31 +04:00
|
|
|
USER_C = \
|
|
|
|
list.c \
|
|
|
|
mkdirp.c \
|
2016-10-26 07:32:23 +03:00
|
|
|
page.c \
|
2018-12-12 03:01:41 +03:00
|
|
|
strlcat.c \
|
|
|
|
strlcpy.c \
|
2014-06-10 01:55:31 +04:00
|
|
|
timestamp.c \
|
|
|
|
include/sys/list.h \
|
|
|
|
include/sys/list_impl.h
|
|
|
|
|
2019-10-02 20:39:48 +03:00
|
|
|
if BUILD_LINUX
|
|
|
|
USER_C += \
|
|
|
|
os/linux/getexecname.c \
|
|
|
|
os/linux/gethostid.c \
|
2020-08-30 20:37:44 +03:00
|
|
|
os/linux/getmntany.c \
|
|
|
|
os/linux/zone.c
|
2019-10-02 20:39:48 +03:00
|
|
|
endif
|
|
|
|
|
2020-04-14 21:36:28 +03:00
|
|
|
if BUILD_FREEBSD
|
|
|
|
USER_C += \
|
|
|
|
os/freebsd/getexecname.c \
|
|
|
|
os/freebsd/gethostid.c \
|
|
|
|
os/freebsd/getmntany.c \
|
2020-08-30 20:37:44 +03:00
|
|
|
os/freebsd/mnttab.c \
|
|
|
|
os/freebsd/zone.c
|
2020-04-14 21:36:28 +03:00
|
|
|
endif
|
|
|
|
|
2020-06-25 21:14:54 +03:00
|
|
|
libspl_la_SOURCES = \
|
2014-06-10 01:55:31 +04:00
|
|
|
$(USER_C) \
|
2020-06-19 22:24:20 +03:00
|
|
|
$(TARGET_CPU_ATOMIC_SOURCE)
|
2011-07-05 23:12:08 +04:00
|
|
|
|
2020-07-05 01:24:13 +03: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 20:10:41 +03:00
|
|
|
libspl_la_LIBADD += $(LIBCLOCK_GETTIME)
|