1include $(top_srcdir)/config/Rules.am 2 3if TARGET_CPU_I386 4TARGET_CPU_ATOMIC_SOURCE = asm-i386/atomic.S 5else 6if TARGET_CPU_X86_64 7TARGET_CPU_ATOMIC_SOURCE = asm-x86_64/atomic.S 8else 9TARGET_CPU_ATOMIC_SOURCE = asm-generic/atomic.c 10endif 11endif 12 13SUBDIRS = include 14 15AM_CCASFLAGS = \ 16 $(CFLAGS) 17 18noinst_LTLIBRARIES = libspl_assert.la libspl.la 19 20libspl_assert_la_SOURCES = \ 21 assert.c 22 23USER_C = \ 24 list.c \ 25 mkdirp.c \ 26 page.c \ 27 strlcat.c \ 28 strlcpy.c \ 29 timestamp.c \ 30 include/sys/list.h \ 31 include/sys/list_impl.h 32 33if BUILD_LINUX 34USER_C += \ 35 os/linux/getexecname.c \ 36 os/linux/gethostid.c \ 37 os/linux/getmntany.c \ 38 os/linux/zone.c 39endif 40 41if BUILD_FREEBSD 42USER_C += \ 43 os/freebsd/getexecname.c \ 44 os/freebsd/gethostid.c \ 45 os/freebsd/getmntany.c \ 46 os/freebsd/mnttab.c \ 47 os/freebsd/zone.c 48endif 49 50libspl_la_SOURCES = \ 51 $(USER_C) \ 52 $(TARGET_CPU_ATOMIC_SOURCE) 53 54libspl_la_LIBADD = \ 55 libspl_assert.la 56 57libspl_la_LIBADD += $(LIBCLOCK_GETTIME) 58 59include $(top_srcdir)/config/CppCheck.am 60 61# Override the default SOURCES which includes TARGET_CPU_ATOMIC_SOURCE 62# in order to always evaluate the generic asm-generic/atomic.c source. 63CPPCHECKSRC = $(USER_C) asm-generic/atomic.c 64cppcheck: 65 $(CPPCHECK) -j$(CPU_COUNT) $(CPPCHECKFLAGS) --force \ 66 $(DEFAULT_INCLUDES) $(CPPCHECKSRC) 67