diff --git a/lib/libspl/Makefile.am b/lib/libspl/Makefile.am index 77d8aba0e..e11b165d7 100644 --- a/lib/libspl/Makefile.am +++ b/lib/libspl/Makefile.am @@ -1,20 +1,16 @@ include $(top_srcdir)/config/Rules.am if TARGET_CPU_I386 -TARGET_CPU_DIR = asm-i386 +TARGET_CPU_ATOMIC_SOURCE = asm-i386/atomic.S else if TARGET_CPU_X86_64 -TARGET_CPU_DIR = asm-x86_64 +TARGET_CPU_ATOMIC_SOURCE = asm-x86_64/atomic.S else -TARGET_CPU_DIR = asm-generic +TARGET_CPU_ATOMIC_SOURCE = asm-generic/atomic.c endif endif -VPATH = \ - $(top_srcdir)/lib/libspl \ - $(top_srcdir)/lib/libspl/$(TARGET_CPU_DIR) - -SUBDIRS = include $(TARGET_CPU_DIR) +SUBDIRS = include DIST_SUBDIRS = include asm-generic asm-i386 asm-x86_64 AM_CFLAGS += $(LIBTIRPC_CFLAGS) @@ -48,14 +44,11 @@ USER_C += \ os/freebsd/gethostid.c \ os/freebsd/getmntany.c \ os/freebsd/mnttab.c - endif -USER_ASM = atomic.S - nodist_libspl_la_SOURCES = \ $(USER_C) \ - $(USER_ASM) + $(TARGET_CPU_ATOMIC_SOURCE) libspl_la_LIBADD = -lrt $(LIBTIRPC_LIBS) diff --git a/lib/libspl/asm-generic/Makefile.am b/lib/libspl/asm-generic/Makefile.am index 396823160..1d5e224b1 100644 --- a/lib/libspl/asm-generic/Makefile.am +++ b/lib/libspl/asm-generic/Makefile.am @@ -1,15 +1 @@ -include $(top_srcdir)/config/Rules.am - -atomic_SOURCE = atomic.c -atomic_ASM = atomic.S - -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -fPIC -EXTRA_DIST = $(atomic_SOURCE) - -# Generates assembly to simplify inclusion in ../Makefile.am -all-am: - $(COMPILE) -c -S $(atomic_SOURCE) -o $(atomic_ASM) - -clean-generic: - $(RM) $(atomic_ASM) +EXTRA_DIST = atomic.c diff --git a/lib/libspl/asm-i386/Makefile.am b/lib/libspl/asm-i386/Makefile.am index e1126102f..e954ec401 100644 --- a/lib/libspl/asm-i386/Makefile.am +++ b/lib/libspl/asm-i386/Makefile.am @@ -1 +1 @@ -noinst_HEADERS = atomic.S +EXTRA_DIST = atomic.S diff --git a/lib/libspl/asm-x86_64/Makefile.am b/lib/libspl/asm-x86_64/Makefile.am index e1126102f..e954ec401 100644 --- a/lib/libspl/asm-x86_64/Makefile.am +++ b/lib/libspl/asm-x86_64/Makefile.am @@ -1 +1 @@ -noinst_HEADERS = atomic.S +EXTRA_DIST = atomic.S